-
Notifications
You must be signed in to change notification settings - Fork 976
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
Don't convert entry.Name twice when accessing updateIndex #402
Don't convert entry.Name twice when accessing updateIndex #402
Conversation
is this covering similar ground to #309? (haven't looked at the issue, just a query as they look to be changing similar things) |
Yes, that PR was supposed to fix that issue, but it's been stale for almost a year. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The general idea seems correct, but I'm not too found of the naming. Could you check the comments?
Accepted suggestion Co-Authored-By: nils måsén <[email protected]>
Co-Authored-By: nils måsén <[email protected]>
Co-Authored-By: nils måsén <[email protected]>
Co-Authored-By: nils måsén <[email protected]>
I found out that deleting empty directory entry from ZipFile and then adding it back causes an exception while trying to add to
updateIndex
dictionary - because checking for existing element uses transformedentity.Name
while adding uses its original value. Also directory name gets transformed as file name and ending slash gets removed therefore those too values are not same especially in directory case.Entry.Name
is already transformed file name so it shouldn't be transformed twice. So I replaced all such accesses to use entry.Name or transformed string-filename.Fixes #82
I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.