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 a zip is created via zip.js and later tried to be opened on a user's machine which runs an older version of macOS, the default Archive Utility cannot unzip it as it results in an error. Any zip file created with the ZipManager demo is affected in the same way too.
The error is "Error 2 - No such file or directory" (in case of High Sierra and Mojave).
When unzipping it via the unzip command, it works without an issue and I assume it would work with 3rd party unarchiver apps too, but our use-case cannot require that the user has such tool installed.
When zip -F is ran on the zip file, it does not output any specific issues with the original archive, but the resulting archive can be unzipped via the Archive Utility:
zip -F test.zip --out test_fixed.zip
Fix archive (-F) - assume mostly intact archive
Zip entry offsets do not need adjusting
copying: testdir/
copying: testdir/content.txt
When looking at the original and the fixed zip via zipinfo -v, I only see 2 differences:
The file size is smaller for the fixed zip (446 vs 422) and the difference in file size is exactly the same as the difference of the central directory offset (215 vs 191).
For each entry, the extended local header is no in the fixed file, while it is yes in the archive which was created via zip.js
Not sure if there's any other differences between the zip files as I could only extract this much information.
Here are the files which I've tested with:
Original zip created via zip.js, using the ZipManager demo: test.zip
File created via running zip -F on the test.zip file, on the machine which could not open it: test_fixed.zip
I've tried to disable the extendedTimestamp and the dataDescriptor option in our code which calls exportUint8Array, but it resulted in the same behaviour.
Is there any way to get a resulting zip file which can be opened on these machines (so it matches the fixed zip file)?
The text was updated successfully, but these errors were encountered:
Hi,
When a zip is created via zip.js and later tried to be opened on a user's machine which runs an older version of macOS, the default Archive Utility cannot unzip it as it results in an error. Any zip file created with the ZipManager demo is affected in the same way too.
The error is "Error 2 - No such file or directory" (in case of High Sierra and Mojave).
When unzipping it via the
unzip
command, it works without an issue and I assume it would work with 3rd party unarchiver apps too, but our use-case cannot require that the user has such tool installed.When
zip -F
is ran on the zip file, it does not output any specific issues with the original archive, but the resulting archive can be unzipped via the Archive Utility:When looking at the original and the fixed zip via
zipinfo -v
, I only see 2 differences:extended local header
isno
in the fixed file, while it isyes
in the archive which was created via zip.jsNot sure if there's any other differences between the zip files as I could only extract this much information.
Here are the files which I've tested with:
Original zip created via zip.js, using the ZipManager demo: test.zip
File created via running
zip -F
on thetest.zip
file, on the machine which could not open it: test_fixed.zipI've tried to disable the
extendedTimestamp
and thedataDescriptor
option in our code which callsexportUint8Array
, but it resulted in the same behaviour.Is there any way to get a resulting zip file which can be opened on these machines (so it matches the fixed zip file)?
The text was updated successfully, but these errors were encountered: