Title: vfs: recursive mkdir returns backing-directory path for RealFSProvider · Issue #66220 · nodejs/node · GitHub
Open Graph Title: vfs: recursive mkdir returns backing-directory path for RealFSProvider · Issue #66220 · nodejs/node
X Title: vfs: recursive mkdir returns backing-directory path for RealFSProvider · Issue #66220 · nodejs/node
Description: Version main Platform All Subsystem vfs What steps will reproduce the bug? import { mkdtempSync, mkdirSync, existsSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { join } from 'node:path'; import { create, RealFSProvider ...
Open Graph Description: Version main Platform All Subsystem vfs What steps will reproduce the bug? import { mkdtempSync, mkdirSync, existsSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { join } from 'node...
X Description: Version main Platform All Subsystem vfs What steps will reproduce the bug? import { mkdtempSync, mkdirSync, existsSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { j...
Opengraph URL: https://github.com/nodejs/node/issues/66220
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"vfs: recursive mkdir returns backing-directory path for RealFSProvider","articleBody":"### Version\n\nmain\n\n### Platform\n\n```text\nAll\n```\n\n### Subsystem\n\nvfs\n\n### What steps will reproduce the bug?\n\n```js\nimport { mkdtempSync, mkdirSync, existsSync } from 'node:fs';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { create, RealFSProvider } from 'node:vfs';\n\nconst root = mkdtempSync(join(tmpdir(), 'vfs-'));\nconst myVfs = create(new RealFSProvider(root));\nconst mountPoint = myVfs.mount();\n\nconst asked = join(mountPoint, 'a/b');\nconst created = mkdirSync(asked, { recursive: true });\nconsole.log('created:', created);\nconsole.log('existsSync(created):', existsSync(created));\nconsole.log('existsSync(asked):', existsSync(asked));\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways\n\n### What is the expected behavior? Why is that the expected behavior?\n\n`created` should be `\u003cmountPoint>/a` and pass `fs.existsSync()`\n\n### What do you see instead?\n\n```console\ncreated: /dev/null/vfs/0/var/folders/42/54jl1_3x4hz06cf7bc_kzd4h0000gn/T/vfs-MMktQW/a\nexistsSync(created): false\nexistsSync(asked): true\n```\n\n`created` is `\u003cmountPoint>/\u003cbacking-root>/a` — the absolute backing-directory path leaks through — and `fs.existsSync(created)` is `false`\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-09-23T02:00:41Z","url":"https://github.com/nodejs/node/issues/66220"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1941c3f8-b27a-fc9f-8cd5-fd4845412b04 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8052:261BEA:474C6A:5F1BD5:6B061E84 |
| html-safe-nonce | 85e8d8ff5772452d6c6353b5d7651680bebcba6417762e90a80f4f677fc22641 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDUyOjI2MUJFQTo0NzRDNkE6NUYxQkQ1OjZCMDYxRTg0IiwidmlzaXRvcl9pZCI6IjEyMjM5NjEwNzI5MzIxMDE3NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2ead6acf8366a72aaad287967827e57eccdfc40291e0453a75ca1f694b024042 |
| hovercard-subject-tag | issue:5547666019 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/66220/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d0518f32e7bedc5c6f659671f65079e36b94c2bfaf8864044117bba5b3a7738d/nodejs/node/issues/66220 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d0518f32e7bedc5c6f659671f65079e36b94c2bfaf8864044117bba5b3a7738d/nodejs/node/issues/66220 |
| og:image:alt | Version main Platform All Subsystem vfs What steps will reproduce the bug? import { mkdtempSync, mkdirSync, existsSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { join } from 'node... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trivikr |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9a7c5824b75ea2ec5e3de73a483229c7bb9f32a774ffd401f010dd9bacf1483d |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b25c3080e84402f75431d8dc7a96b2635219cec7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width