Skip to content
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

Prevent mismatches between arcname and data when adding paths #22

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

pR0Ps
Copy link
Owner

@pR0Ps pR0Ps commented Oct 2, 2023

Previously, it was possible to add a directory and give it an arcname that didn't end with a "/". Likewise, it was also possible to add a file with a arcname that ended with a "/". These cases would cause an incorrect stream size to be calculated, as well as create strange zip files.

This commit fixes this issue by modifying arcnames as paths are added to ensure that directories end with "/" and files do not.

Previously, it was possible to add a directory and give it an arcname that
didn't end with a "/". Likewise, it was also possible to add a file
with a arcname that ended with a "/". These cases would cause an
incorrect stream size to be calculated, as well as create strange zip
files.

This commit fixes this issue by modifying arcnames as paths are added to
ensure that directories end with "/" and files do not.
@pR0Ps pR0Ps merged commit 882fe4d into master Oct 2, 2023
19 checks passed
@pR0Ps pR0Ps deleted the bugfix/fix-incorrect-arcnames branch October 2, 2023 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant