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

Change FastZip.ExtractZip to use the new ZipFile constructor to set isStreamOwner, rather than setting the property after construction #311

Merged
merged 2 commits into from
Jan 26, 2019

Conversation

Numpsy
Copy link
Contributor

@Numpsy Numpsy commented Jan 21, 2019

FastZip.ExtractZip uses ZipFile internally and might fall over #144 when working with a corrupt file (whereby it closes the input stream even if isStreamOwner is set to false when an error occurs).

Try to avoid that by using the new ZipFile constructor and setting leaveOpen as required.

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.

…sStreamOwner, rather than setting the property after construction.
… bit better when handling a corrupt zip file
@piksel
Copy link
Member

piksel commented Jan 25, 2019

Agreed.

@piksel piksel merged commit f68abec into icsharpcode:master Jan 26, 2019
@Numpsy Numpsy deleted the fastzip_stream_close_1 branch January 26, 2019 15:58
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

2 participants