-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't unzip file on MacOS Catalina #86
Comments
Issue fixed. Will include it in the next release. |
@srikanth-lingala Thanks! |
Fixed in v2.2.3 released today |
@srikanth-lingala Hi there! I'm facing a similar issue currently in an unrelated project. Would you mind explaining what was wrong and how your fix made the produced files compatible with Catalina? |
@halfdan For entries in zip which had extra data record (crc, compressed and uncompressed sizes after the end of data), zip4j was writing uncompressed size as -1 in the local file header, which in theory should not matter because the actual size is in the extra data record. But I guess there were some additional checks added to the zip utility in Catalina, and in those cases where zip4j wrote -1, the zip files could not be opened on Catalina (used to work fine on older versions of Mac). Fix was to write 0 instead of -1. Hope that helped. |
This problem again occurred on Mac Os Big Sur v11.1. An archive can not be opened with the default Archive Utility. @srikanth-lingala please reopen issue. |
I'm generating a zip file using zip4j, and it opens perfectly on older MacOS but since upgrading to Catalina I get the following error:
"Unable to expand into 'Downloads'. (Error 79 - Inappropriate file type or format.)"
After playing with the code a bit I narrowed it down to happening only when using streams (
addStream
) and the compression method is "deflate".Looking at the logs in the Console I saw this error:
"[ERROR] Couldn't read the header of the entry: Error Domain=NSPOSIXErrorDomain Code=79 UserInfo={NSURL=, NSDebugDescription=}"
Unzipping with the command line works fine.
Tested on the newest version (2.2.2).
Attaching an example zip file.
example.zip
The text was updated successfully, but these errors were encountered: