-
Notifications
You must be signed in to change notification settings - Fork 376
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
Unable to extract zip with extra fields present in local file header #15
Comments
I believe this might also be a fix for issue 12, as the attached zip file for that issue (dexter.en.zip) contains extra fields in the local header. |
👍 this fixes the CRC issue for me as well. |
ghost
assigned cthackers
Oct 28, 2012
@dasebrook would be helpful for you to submit a pull-request from your branch so folks (like me) could just point their repositories there |
JoshuaGross
added a commit
to JoshuaGross/adm-zip
that referenced
this issue
Dec 19, 2012
fixed |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A ZIP containing files created with extra fields present in their local file header (such as universal time, and Unix UID/GID) cannot be properly extracted with extractEntryTo or extractAllTo methods.
I believe the fix is to replace the following line in zipFile.js:
entry.setCompressedData(buf.slice(entry.header.offset, entry.header.offset + Utils.Constants.LOCHDR + entry.header.compressedSize + entry.entryName.length));
with:
entry.setCompressedData(buf.slice(entry.header.offset, entry.header.offset + Utils.Constants.LOCHDR + entry.header.compressedSize + entry.entryName.length + buf.readUInt16LE(entry.header.offset + Utils.Constants.LOCEXT)));
The text was updated successfully, but these errors were encountered: