Philipp Dunkel
407a9ec743
vfs: apply open(2) effects to ZipProvider handles
...
A ZipProvider handle keeps its content in memory and adds the entry to
the archive when it is closed, and only if something was written. The
effects a real `open(2)` has at open time are therefore lost, and so is
the metadata the entry already carried:
* `open(path, 'w')` followed by `close()` neither truncates an existing
entry nor creates a missing one; the same holds for "a" on a missing
file. Tools that touch or truncate by open-then-close do nothing.
* Rewriting an entry (append, or an in-place write through "r+") re-adds
it with the `mode` argument `open()` received (fs's default 0o666),
not the mode the entry had, so a 0o755 script silently loses its
executable bit.
* `fstat` on a handle reports that same `open()` mode and the current
time instead of the entry's mode and modification time.
* Renaming a file onto an existing directory succeeds and leaves a name
that is both a file and a directory; real file systems refuse with
EISDIR.
This adds a test for each of these against a mounted ZipBuffer, stating
the real-fs outcome as the expectation.
Proposed solution: mark the handle dirty at open time when the flags
imply creation or truncation, so close always commits; carry the
existing entry's mode and modification time on the handle, use them
for `fstat` and for the re-added entry, and only fall back to the
`open()` mode for a newly created entry; and reject `rename` onto an
existing directory with EISDIR before touching the archive.
Signed-off-by: Philipp Dunkel <pip@pipobscure.com >
PR-URL: https://github.com/nodejs/node/pull/65853
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2026-09-08 21:31:49 +02:00
..
2026-09-03 23:54:01 +00:00
2026-09-03 15:37:22 +00:00
2026-09-05 02:49:07 +00:00
2026-09-03 15:37:22 +00:00
2026-09-06 08:43:54 +00:00
2026-09-06 08:43:54 +00:00
2026-09-06 08:43:54 +00:00
2026-09-06 08:43:54 +00:00
2026-09-05 02:49:04 +00:00
2026-09-05 02:49:04 +00:00
2026-09-06 08:43:54 +00:00
2026-09-06 08:43:54 +00:00
2026-09-06 08:43:54 +00:00
2026-09-06 08:43:54 +00:00
2026-09-03 15:37:21 +00:00
2026-09-06 08:43:54 +00:00
2026-09-05 02:49:07 +00:00
2026-09-06 08:43:54 +00:00
2026-09-06 08:43:54 +00:00
2026-09-05 02:49:07 +00:00
2026-09-06 08:43:54 +00:00
2026-09-06 08:43:54 +00:00
2026-09-05 02:49:05 +00:00
2026-09-03 12:57:27 +00:00
2026-09-04 13:28:27 +00:00
2026-09-03 05:35:54 +00:00
2026-09-05 05:44:06 +00:00
2026-08-31 14:48:19 +00:00
2026-09-06 06:34:38 +00:00
2026-09-08 16:05:22 +02:00
2026-09-05 13:31:22 +00:00
2026-09-02 08:50:34 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-08 12:54:45 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 10:42:52 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 20:54:14 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-07 05:10:02 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-02 08:50:34 +00:00
2026-09-02 16:43:10 +00:00
2026-09-04 16:48:33 +00:00
2026-09-06 08:43:53 +00:00
2026-09-03 11:40:52 +02:00
2026-09-03 11:40:52 +02:00
2026-09-03 11:40:52 +02:00
2026-09-03 11:40:52 +02:00
2026-09-03 11:40:52 +02:00
2026-09-03 11:40:52 +02:00
2026-09-04 04:45:19 +00:00
2026-09-06 08:43:50 +00:00
2026-09-07 05:26:21 +00:00
2026-09-07 05:26:21 +00:00
2026-08-31 17:03:33 +08:00
2026-09-07 05:26:21 +00:00
2026-09-07 05:26:21 +00:00
2026-09-07 05:26:21 +00:00
2026-09-07 05:26:19 +00:00
2026-08-31 17:03:33 +08:00
2026-09-07 05:26:21 +00:00
2026-08-31 10:19:57 -03:00
2026-09-03 05:36:15 +00:00
2026-09-06 23:02:02 +00:00
2026-09-06 23:02:02 +00:00
2026-09-03 15:28:39 +00:00
2026-09-03 15:28:39 +00:00
2026-09-03 15:28:39 +00:00
2026-09-06 04:36:06 +00:00
2026-09-02 16:17:15 -04:00
2026-09-02 16:17:15 -04:00
2026-09-02 16:17:15 -04:00
2026-09-02 16:17:15 -04:00
2026-09-02 16:17:15 -04:00
2026-09-08 04:53:09 +00:00
2026-08-31 17:48:30 +02:00
2026-09-03 08:43:14 +00:00
2026-08-31 13:07:39 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 15:28:39 +00:00
2026-09-03 09:30:21 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-08-31 17:25:06 +00:00
2026-09-02 03:55:41 +00:00
2026-09-08 15:20:15 +00:00
2026-09-08 08:50:33 +00:00
2026-09-07 11:42:09 +00:00
2026-09-03 15:37:21 +00:00
2026-09-08 16:05:22 +02:00
2026-09-08 16:05:22 +02:00
2026-09-03 15:37:21 +00:00
2026-09-02 14:59:15 +00:00
2026-09-02 14:59:15 +00:00
2026-09-02 14:59:15 +00:00
2026-09-04 22:22:10 +00:00
2026-09-04 22:22:10 +00:00
2026-09-04 16:48:33 +00:00
2026-09-02 05:48:32 +00:00
2026-08-31 14:59:47 +00:00
2026-09-05 17:43:03 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-02 10:00:05 +00:00
2026-09-02 10:00:05 +00:00
2026-09-08 18:01:43 +00:00
2026-09-07 23:22:00 +00:00
2026-09-06 04:36:06 +00:00
2026-09-03 23:54:01 +00:00
2026-09-08 17:33:51 +00:00
2026-09-02 23:33:37 +00:00
2026-09-08 17:33:51 +00:00
2026-09-08 15:50:32 +00:00
2026-09-08 17:33:51 +00:00
2026-08-31 15:47:32 +00:00
2026-09-06 04:35:55 +00:00
2026-09-06 04:36:01 +00:00
2026-09-02 13:14:36 +00:00
2026-09-06 04:36:06 +00:00
2026-09-02 13:14:36 +00:00
2026-09-06 04:36:04 +00:00
2026-09-02 13:14:35 +00:00
2026-09-06 04:35:59 +00:00
2026-09-06 04:36:00 +00:00
2026-09-06 04:36:05 +00:00
2026-09-06 04:36:05 +00:00
2026-09-06 04:36:06 +00:00
2026-09-02 13:14:35 +00:00
2026-09-02 13:14:34 +00:00
2026-09-06 04:36:05 +00:00
2026-09-06 04:36:06 +00:00
2026-09-06 04:36:06 +00:00
2026-09-06 04:36:06 +00:00
2026-09-02 13:14:31 +00:00
2026-09-04 19:57:57 +00:00
2026-09-07 12:35:04 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-08-31 18:04:06 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-03 15:28:39 +00:00
2026-09-07 05:10:02 +00:00
2026-09-02 03:55:31 +00:00
2026-09-02 05:48:32 +00:00
2026-09-04 16:48:33 +00:00
2026-09-08 11:35:41 +00:00
2026-09-02 21:47:04 -07:00
2026-09-02 21:47:04 -07:00
2026-09-07 14:48:56 +00:00
2026-09-08 21:31:49 +02:00
2026-09-02 07:27:11 +00:00
2026-09-08 11:35:41 +00:00
2026-09-02 07:27:11 +00:00
2026-09-02 05:36:48 +00:00
2026-09-05 13:31:22 +00:00
2026-09-08 08:50:21 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-08 12:54:46 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 10:42:52 +00:00
2026-09-05 10:42:52 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 10:42:52 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 13:31:22 +00:00
2026-09-05 10:42:52 +00:00
2026-09-08 08:50:21 +00:00
2026-09-05 13:31:22 +00:00
2026-09-07 14:49:09 +00:00
2026-09-05 13:31:22 +00:00
2026-09-02 07:27:11 +00:00