vfs: support recursive readdir in ZipProvider - #66127
Open
pipobscure wants to merge 1 commit into
Open
pipobscure wants to merge 1 commit into
pipobscure wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66127 +/- ##
==========================================
- Coverage 90.29% 90.27% -0.02%
==========================================
Files 790 790
Lines 272529 272526 -3
Branches 52037 52035 -2
==========================================
- Hits 246074 246025 -49
- Misses 16908 16952 +44
- Partials 9547 9549 +2
🚀 New features to boost your workflow:
|
jasnell
approved these changes
Sep 19, 2026
Contributor
Author
|
Can someone please restart the lint and add |
Collaborator
Contributor
Author
|
I have no idea what the failing CI test is. I did run all tests on Windows & Linux, so I’m assuming it’s a flake until hearing otherwise. If someone can tell me, I’d appreciate it. |
Contributor
Author
|
@richardlau can you have a look at CI for me please. Thanks! |
Contributor
Author
|
@jasnell would you be so kind and give the CI a look / poke. Thanks! |
Collaborator
This was referenced Sep 21, 2026
Contributor
Author
ZipProvider threw ERR_METHOD_NOT_IMPLEMENTED for readdir() with
`{ recursive: true }`, although an archive already stores every member
under its full path, so a recursive listing is the same scan of the
entry names as a flat one, keeping the whole path below the directory
instead of only its first segment.
List every member below the directory, and every directory their paths
pass through, whether the archive holds an entry for it or only implies
it. Names are relative to the listed directory and joined with `/`, as
MemoryProvider returns them, so VirtualFileSystem reports the right
parentPath for each Dirent. A name that is both a member and a
directory is listed once, as a directory, as a flat listing already
did.
The entries are now collected in a map rather than looked up in an
array, so listing a directory no longer takes time quadratic in the
number of its children.
Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
pipobscure
force-pushed
the
vfs-zip-readdir-recursive
branch
from
September 22, 2026 07:56
a3d787b to
bf32efc
Compare
Contributor
Author
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ZipProvider threw ERR_METHOD_NOT_IMPLEMENTED for readdir() with
{ recursive: true }, although an archive already stores every member under its full path, so a recursive listing is the same scan of the entry names as a flat one, keeping the whole path below the directory instead of only its first segment.List every member below the directory, and every directory their paths pass through, whether the archive holds an entry for it or only implies it. Names are relative to the listed directory and joined with
/, as MemoryProvider returns them, so VirtualFileSystem reports the right parentPath for each Dirent. A name that is both a member and a directory is listed once, as a directory, as a flat listing already did.The entries are now collected in a map rather than looked up in an array, so listing a directory no longer takes time quadratic in the number of its children.