You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parsing a zip file, JSZip only reads the DOS attribute to know if it's a folder (see here). This file has no DOS flags, only UNIX ones (in this zip file, a folder entry has the external file attributes 41FD4000, meaning "folder, rights 775").
This will be fixed with #194. Maybe looking for trailing '/' too will harden this.
You can't easily fix this without modifying the JSZip code, but in the meantime you can check if the file name ends with a slash instead of checking entry.dir.
Two new fields on ZipObject, `unixPermissions` and `dosPermissions`, hold the
UNIX or DOS permissions of the file. A new option of `generate()`,
`platform` (DOS or UNIX) controls the use of the permissions.
The default behavior is to generate DOS archives, without any
permissions, like before.
Bonus side-effect : Finder on mac doesn't use the DOS directory flag,
JSZip didn't properly recognize folders until now.
FixStuk#194 and Stuk#198.
Hi,
When I download and iterate the fileEntries in this zip --> https://dl.dropboxusercontent.com/u/3120684/folder.zip - It seems to be trating folders as files?
E.g, neither entry.dir or entry.options.dir are 'true' for the internal folder.
I am trying to extract the contents exactly as it appears in the zip (keeping the folder structure), any advice?
Cheers,
Chris.
The text was updated successfully, but these errors were encountered: