Don't add Zip64 fields when copying entries unless the source entry has them#128
Merged
mrkkrp merged 2 commits intomrkkrp:masterfrom Jun 2, 2025
Merged
Don't add Zip64 fields when copying entries unless the source entry has them#128mrkkrp merged 2 commits intomrkkrp:masterfrom
mrkkrp merged 2 commits intomrkkrp:masterfrom
Conversation
mrkkrp
reviewed
May 30, 2025
When copying an entry from another archive, there is no reason to add Zip64 extra fields if the source entry doesn't have them. This change checks whether a copied entry had Zip64 extra fields before appending/updating the field in the local header.
Add two tests to ensure addEntry and copyEntry don't add unneeded Zip64 extra fields into the local file header.
Owner
|
This looks good, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an continuation of my last MR (#127).
I discovered that the unwanted Zip64 extra fields (from issue #126) get reintroduced when copying files from another archive (and hence when
commitis used between actions). Thankfully, the fix is straightforward - we should be able to rule out the need for Zip64 extra fields if the source entry being copied doesn't use them, since this implies the uncompressed size is sufficiently small. I also added a test which reflects this behavior.