Skip to content

D attribute missing from folder when a file in a subfolder is added #154

@isochronous

Description

@isochronous

In a case like this:

var zip = new JSZip();
zip.file('subdir/test.txt', 'a test file');
/// ... etc

When the created zip is opened in 7zip or another zip program that shows the attributes of each entry in the zip file, the subdir folder exists, but the D (directory) attribute is not present. This causes problems for decompression libraries that use that attribute to check for the presence of directories within the zip. The .folder method seems to create the attribute, however.

In addition, the Method listed for folders should generally be store (vs deflate for files), but is empty when executing the above example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions