Skip to content

JSZip.loadAsync() returning all file entries as directories #604

Description

@lbauret

When calling loadAsync method with the attached zip file's ArrayBuffer, every file entry is read as a directory, and returns the isDir property set to true for every entry. This seems to be related to this line in the code: https://github.com/Stuk/jszip/blob/master/lib/zipEntry.js#L143, which considers the DOS directory flag.
See that the attached ZIP that contains only two files can be decompressed with no problems using any other tool. It seems that there might be an issue regarding how the attached ZIP was compressed, which causes the dir condition to return true for every entry in the zip.
This problem does not occur when decompressing and re-compressing the zip content. This is why I believe this has to do with some particular compression method.
I am using JSZip version 3.2.1
wrongly-imported.zip

Activity

  1. added this to the v3 milestone on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions