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.
In a case like this:
When the created zip is opened in 7zip or another zip program that shows the attributes of each entry in the zip file, the
subdirfolder exists, but theD(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.foldermethod seems to create the attribute, however.In addition, the
Methodlisted for folders should generally bestore(vsdeflatefor files), but is empty when executing the above example.