René's URL Explorer Experiment


Title: fs.mkdtempDisposableSync() / fsPromises.mkdtempDisposable() throw and leak the directory when the path is a Buffer · Issue #66593 · nodejs/node · GitHub

Open Graph Title: fs.mkdtempDisposableSync() / fsPromises.mkdtempDisposable() throw and leak the directory when the path is a Buffer · Issue #66593 · nodejs/node

X Title: fs.mkdtempDisposableSync() / fsPromises.mkdtempDisposable() throw and leak the directory when the path is a Buffer · Issue #66593 · nodejs/node

Description: Node.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.

Open Graph Description: Node.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.

X Description: Node.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.

Opengraph URL: https://github.com/nodejs/node

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fs.mkdtempDisposableSync() / fsPromises.mkdtempDisposable() throw and leak the directory when the path is a Buffer","articleBody":"### Version\n\nv27.0.0-nightly20261007aa1bf2cc37 (main at 6d5e309871)\n\n### Platform\n\nLinux x64\n\n### Subsystem\n\nfs\n\n### What steps will reproduce the bug?\n\n```js\nconst fs = require('node:fs');\nconst os = require('node:os');\nconst path = require('node:path');\n\nconst base = fs.mkdtempSync(path.join(os.tmpdir(), 'repro-'));\nconst prefix = path.join(base, 'x-');\n\nfor (const args of [[Buffer.from(prefix)], [prefix, { encoding: 'buffer' }]]) {\n  try {\n    fs.mkdtempDisposableSync(...args);\n  } catch (err) {\n    console.log(err.message);\n    console.log('left behind:', fs.readdirSync(base));\n  }\n}\n```\n\n`fs.promises.mkdtempDisposable()` behaves the same way.\n\n### How often does it reproduce? Is there a required condition?\n\nAlways, whenever the created path is a Buffer: the prefix is a Buffer, or `encoding` is `'buffer'`.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nBoth calls return the disposable object with a Buffer `path`, and `remove()` deletes the directory. The docs list `path` as `{string|Buffer}`, and since #64397 a Buffer prefix defaults `encoding` to `'buffer'`.\n\n### What do you see instead?\n\n```\nThe \"paths[1]\" argument must be of type string. Received an instance of Buffer\nleft behind: [ 'x-Kx8KEG' ]\nThe \"paths[1]\" argument must be of type string. Received an instance of Buffer\nleft behind: [ 'x-Kx8KEG', 'x-gV98fq' ]\n```\n\nThe `ERR_INVALID_ARG_TYPE` is thrown after the directory has been created. The caller never gets the disposable object, so nothing removes the directory.\n\n### Additional information\n\nAfter `binding.mkdtemp()` creates the directory, both functions stash its absolute path for `remove()` with `pathModule.resolve(cwd, path)`, and `path.resolve()` only accepts strings. The `{ encoding: 'buffer' }` form has failed this way since `mkdtempDisposable()` was added in #58516; #64397 made every Buffer prefix take the same path.\n\nI have a fix and will open a PR.\n","author":{"url":"https://github.com/gengjiawen","@type":"Person","name":"gengjiawen"},"datePublished":"2026-10-08T06:52:52Z","url":"https://github.com/nodejs/node/issues/66593"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:6bac7e41-27ec-323d-1490-340f2068740f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8388:B3C94:4320F0:573C8E:6AED2237
html-safe-nonce854da82d70b79a0da0d9f27ec30d63ff14303f9af60d2072637c9e4f3cbe2c49
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Mzg4OkIzQzk0OjQzMjBGMDo1NzNDOEU6NkFFRDIyMzciLCJ2aXNpdG9yX2lkIjoiNzQ1NTEzMTIzNjkyNjU2Mjg3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacab7a47a79015f5a2017e324fa551bb034de2f2b03d2e0d95f8ef8bfb6409f088
hovercard-subject-tagrepository:27193779
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/nodejs/node/issues/66593
twitter:imagehttps://opengraph.githubassets.com/495326f65e226f3772556773a0910e16c532881a95d78ab4dc86716d0732686f/nodejs/node
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/495326f65e226f3772556773a0910e16c532881a95d78ab4dc86716d0732686f/nodejs/node
og:image:altNode.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonee3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6
turbo-cache-controlno-cache
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release707a24b346ac8a82878b9c084efaa38a997660cb
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/66593#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66593
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66593
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/66593
Reloadhttps://github.com/nodejs/node/issues/66593
Reloadhttps://github.com/nodejs/node/issues/66593
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66593
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66593
#66594https://github.com/nodejs/node/pull/66594
fs.mkdtempDisposableSync() / fsPromises.mkdtempDisposable() throw and leak the directory when the path is a Bufferhttps://github.com/nodejs/node/issues/66593#top
#66594https://github.com/nodejs/node/pull/66594
https://github.com/gengjiawen
gengjiawenhttps://github.com/gengjiawen
on Oct 8, 2026https://github.com/nodejs/node/issues/66593#issue-5757354686
6d5e309https://github.com/nodejs/node/commit/6d5e30987117e072bb4638c0535946464a314b7e
#64397https://github.com/nodejs/node/pull/64397
#58516https://github.com/nodejs/node/pull/58516
#64397https://github.com/nodejs/node/pull/64397
gengjiawenhttps://github.com/gengjiawen
on Oct 8, 2026https://github.com/nodejs/node/issues/66593#event-32757395201
fs: fix mkdtempDisposable with Buffer pathshttps://github.com/gengjiawen/node/commit/f88356bf0aa9faadfdad7fd7baa6f7627743efe0
f88356bhttps://github.com/gengjiawen/node/commit/f88356bf0aa9faadfdad7fd7baa6f7627743efe0
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/66593
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66593
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.