Skip to content

extracting subdirectory requires directory entries in the zip #347

@peteruhnak

Description

@peteruhnak

According to the docs, it should be possible to extract subdirectories, e.g.

new ZipFile("filename.zip").extractFile("folderNameInZip/", "/destination_directory");

However, this requires a directory entry to be present in the archive:

As far as I understand, having directory entries in zips is optional, so the unzipping should not check for them. Presumably it should only compare against the user-supplied entry name (and ensure the user-supplied name ends with a slash).

Here's an example archive with no directory entires:

archive-no-dirs.zip

The archive was created with Powershell 7 Compress-Archive cmdlet ( https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.archive/compress-archive?view=powershell-7.1 )

Metadata

Metadata

Labels

bugSomething isn't workingresolved

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions