-
Notifications
You must be signed in to change notification settings - Fork 73
Appending to zip file with non-UTF-8 filenames corrupts the central directory #364
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
base: master
Are you sure you want to change the base?
Conversation
Resolves #361 |
To provide feedback, navigate to the Files changed tab and leave comments on the proposed code changes. Choose Start review for each comment, and then choose Request changes, and I'll propose revised changes. |
⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done |
✅ I finished the code review, and didn't find any security or code quality issues. |
@@ -0,0 +1,18 @@ | |||
// This is a temporary file to show the fix | |||
// The fix is in the flags() method of ZipFileData | |||
|
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.
Update the existing flags method instead of creating this new file.
self.start_file(&name, options)?; | ||
|
||
// Access the last file entry and replace the filename_raw | ||
if let Some((_name, file_data)) = self.files.last_mut() { |
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.
Return an error if this is None
.
⏳ I'm generating code changes based on the feedback. I'll update this pull request when I'm done. |
1 similar comment
⏳ I'm generating code changes based on the feedback. I'll update this pull request when I'm done. |
Pull request for Appending to zip file with non-UTF-8 filenames corrupts the central directory