Title: vfs: `ZipProvider.rename()` fails with `ENOENT` for implicit directories · Issue #65751 · nodejs/node · GitHub
Open Graph Title: vfs: `ZipProvider.rename()` fails with `ENOENT` for implicit directories · Issue #65751 · nodejs/node
X Title: vfs: `ZipProvider.rename()` fails with `ENOENT` for implicit directories · Issue #65751 · nodejs/node
Description: Version main Platform macOS Subsystem vfs What steps will reproduce the bug? import { ZipBuffer, ZipEntry, createZipArchive } from 'node:zlib'; import { ZipProvider, create } from 'node:vfs'; const zipEntry = await ZipEntry.create('dir/f...
Open Graph Description: Version main Platform macOS Subsystem vfs What steps will reproduce the bug? import { ZipBuffer, ZipEntry, createZipArchive } from 'node:zlib'; import { ZipProvider, create } from 'node:vfs'; const...
X Description: Version main Platform macOS Subsystem vfs What steps will reproduce the bug? import { ZipBuffer, ZipEntry, createZipArchive } from 'node:zlib'; import { ZipProvider, create } from 'node...
Opengraph URL: https://github.com/nodejs/node/issues/65751
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"vfs: `ZipProvider.rename()` fails with `ENOENT` for implicit directories","articleBody":"### Version\n\nmain\n\n### Platform\n\n```text\nmacOS\n```\n\n### Subsystem\n\nvfs\n\n### What steps will reproduce the bug?\n\n```js\nimport { ZipBuffer, ZipEntry, createZipArchive } from 'node:zlib';\nimport { ZipProvider, create } from 'node:vfs';\n\nconst zipEntry = await ZipEntry.create('dir/file.txt', Buffer.from('hello'));\nconst zipArchive = createZipArchive([zipEntry]);\nconst archive = Buffer.concat(await Array.fromAsync(zipArchive));\n\nconst fs = create(new ZipProvider(new ZipBuffer(archive))).promises;\nawait fs.rename('/dir', '/renamed-dir');\nconsole.log(await fs.readFile('/renamed-dir/file.txt', 'utf8'));\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\nRenaming the implicit `/dir` directory moves its descendant entries. The program prints `hello`.\n\n### What do you see instead?\n\n`ZipProvider.rename()` only looks for an explicit `dir` archive entry, so it treats the implicit directory as missing. The program throws `ENOENT`.\n\n### Additional information\n\nfs equivalent which prints `hello`\n\n```js\nimport { mkdtemp, mkdir, writeFile, rename, readFile } from 'node:fs/promises';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\n\nconst root = await mkdtemp(join(tmpdir(), 'rename-repro-'));\nawait mkdir(join(root, 'dir'));\nawait writeFile(join(root, 'dir/file.txt'), 'hello');\n\nawait rename(join(root, 'dir'), join(root, 'renamed-dir'));\nconsole.log(await readFile(join(root, 'renamed-dir/file.txt'), 'utf8'));\n```","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-09-03T01:47:50Z","url":"https://github.com/nodejs/node/issues/65751"}
| react-profiling | 0 |
| react-import-map | react,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 | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4ac04dc2-d30f-7b77-9300-b7f9bd53eb2e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A482:32C11E:2DACC2:3DC47A:6AED4B75 |
| html-safe-nonce | 8c3c3b7013f6a311d4a03d40a8ca9762e0992695a19fc86d06a7118ac473da68 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDgyOjMyQzExRToyREFDQzI6M0RDNDdBOjZBRUQ0Qjc1IiwidmlzaXRvcl9pZCI6Ijg1MTc0MDAyMzI2MTYzNDg1MzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9e2787c4e758ac0f508f2299b2747efc97087bd44492291fee51bdab3de68842 |
| hovercard-subject-tag | issue:5331198711 |
| 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/65751/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ec3df941dededd0c1145e8ca9089b48ab6f0fc0c937b4f725ed64527af029133/nodejs/node/issues/65751 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ec3df941dededd0c1145e8ca9089b48ab6f0fc0c937b4f725ed64527af029133/nodejs/node/issues/65751 |
| og:image:alt | Version main Platform macOS Subsystem vfs What steps will reproduce the bug? import { ZipBuffer, ZipEntry, createZipArchive } from 'node:zlib'; import { ZipProvider, create } from 'node:vfs'; const... |
| 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 | 56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11 |
| 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 | 9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width