Skip to content

Conversation

@Numpsy
Copy link
Contributor

@Numpsy Numpsy commented Apr 10, 2020

When writing the local/central directory entries in ZipFile, use the CompressionMethodForHeader property of ZipEntry instead of the CompressionMethod property, in order to handle the case where the entry method is WinZipAes.

Add a couple of extra unit tests, which both try to verify using SharpZipLib locally (#317 aside) and with 7-Zip.

refs #439

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.

@Numpsy
Copy link
Contributor Author

Numpsy commented Apr 10, 2020

The CompressionMethodForHeader property shouid only differ from the CompressionMethod property for AES encrypted entries, and as you can't presently add those via ZipFile the change should only effect updates to existing files that contain AES encrypted entries.

I don't think there are any situations where this would break anything, given that the current code already breaks such entries when the file is updated?

@piksel
Copy link
Member

piksel commented Apr 11, 2020

No, it shouldn't afaik.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready PR ready for merging when appropriate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants