-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix ZipEntry name mismatch when attempting to update a directory entry #309
Conversation
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.
Why is FindExistingUpdate changed here?
@@ -1579,7 +1579,7 @@ private void AddUpdate(ZipUpdate update) | |||
{ | |||
contentsEdited_ = true; | |||
|
|||
int index = FindExistingUpdate(update.Entry.Name); | |||
int index = FindExistingUpdate(update.Entry); |
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.
Why is FindExistingUpdate changed here?
The FindExistingUpdate(ZipEntry)
method should probably just call FindExistingUpdate(string)
for DRYness, but that's for another issue...
@@ -2511,6 +2513,15 @@ private int FindExistingUpdate(string fileName) | |||
return result; | |||
} | |||
|
|||
private bool IsDirectoryName(string name) |
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.
GetTransformedFileName
is only referenced in FindExistingUpdate
, perhaps GetTransformedFileName
, GetTransformedDirectoryName
and IsDirectoryName
should be reduced to a single function called GetTransformedEntryName
? The two former ones are almost identical.
Closing due to lack of response. |
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.