Title: vfs: ZipProvider allows creating entries beneath non-directory parents · Issue #65828 · nodejs/node · GitHub
Open Graph Title: vfs: ZipProvider allows creating entries beneath non-directory parents · Issue #65828 · nodejs/node
X Title: vfs: ZipProvider allows creating entries beneath non-directory parents · Issue #65828 · nodejs/node
Description: Version main Platform macOS Subsystem vfs What steps will reproduce the bug? import { createZipArchive, ZipBuffer, ZipEntry } from 'node:zlib'; import { create, ZipProvider } from 'node:vfs'; const zipEntry = await ZipEntry.create('file....
Open Graph Description: Version main Platform macOS Subsystem vfs What steps will reproduce the bug? import { createZipArchive, ZipBuffer, ZipEntry } from 'node:zlib'; import { create, ZipProvider } from 'node:vfs'; const...
X Description: Version main Platform macOS Subsystem vfs What steps will reproduce the bug? import { createZipArchive, ZipBuffer, ZipEntry } from 'node:zlib'; import { create, ZipProvider } from 'node...
Opengraph URL: https://github.com/nodejs/node/issues/65828
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"vfs: ZipProvider allows creating entries beneath non-directory parents","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 { createZipArchive, ZipBuffer, ZipEntry } from 'node:zlib';\nimport { create, ZipProvider } from 'node:vfs';\n\nconst zipEntry = await ZipEntry.create('file.txt', Buffer.from('contents'));\nconst zipArchive = createZipArchive([zipEntry]);\nconst archive = Buffer.concat(await Array.fromAsync(zipArchive));\nconst fs = create(new ZipProvider(new ZipBuffer(archive)));\n\ntry {\n await fs.promises.writeFile('/file.txt/child.txt', 'hello');\n console.log('write succeeded');\n} catch (error) {\n console.log(`${error.code}: ${error.message}`);\n}\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\nIt should fail with `ENOTDIR`\n\n### What do you see instead?\n\n```console\nwrite succeeded\n```\n\nThe write incorrectly succeeds even though `file.txt` is not a directory\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-09-05T20:31:34Z","url":"https://github.com/nodejs/node/issues/65828"}
| 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:57617d17-423c-3aa3-732f-853e8d1cbcf3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE16:257A3D:90F01:C1925:6AED04A0 |
| html-safe-nonce | fbd14feced9b3c11e6323fa3bce7a2883567bb0bbdb78802e3f1c576c77b3ff3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTE2OjI1N0EzRDo5MEYwMTpDMTkyNTo2QUVEMDRBMCIsInZpc2l0b3JfaWQiOiI3MTY1MDU3MTkwMjI4NDYwNzA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ddf32f6b8cb358944679b4ca4552a2d975f53fc8a0174c5637673aede077f41a |
| hovercard-subject-tag | issue:5360736305 |
| 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/65828/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c382c15ab2c22e7f43dc2742e0f1585ad9003340d70b600848f46ae1c7d7780c/nodejs/node/issues/65828 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c382c15ab2c22e7f43dc2742e0f1585ad9003340d70b600848f46ae1c7d7780c/nodejs/node/issues/65828 |
| og:image:alt | Version main Platform macOS Subsystem vfs What steps will reproduce the bug? import { createZipArchive, ZipBuffer, ZipEntry } from 'node:zlib'; import { create, ZipProvider } 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 | 21e10c535436b2122cfb44c76dfb4af296e371850fb60de16776f8a64e5c3ed8 |
| 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 | 302a6d707c3288a5f951258a2fa3e926b8c8f8cf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width