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

Close entries streams after read on parse #142

Merged
merged 2 commits into from
May 15, 2024
Merged

Close entries streams after read on parse #142

merged 2 commits into from
May 15, 2024

Conversation

artygus
Copy link
Contributor

@artygus artygus commented May 12, 2024

This PR closes entry streams by utilizing a block version of get_input_stream which takes care of closing the stream and switches Zip::File.open from Zip::File.open_buffer, because .open_buffer causes issues on windows in some versions of rubyzip, see rubyzip/rubyzip@ef89a62 and rubyzip/rubyzip@cdef4a5 (output stream may seem irrelevant, but open_buffer writes data to output stream in some cases https://www.rubydoc.info/gems/rubyzip/2.3.2/Zip%2FFile.open_buffer).

Fixes #141

@slonopotamus
Copy link
Contributor

Looks good. CI is green and you even restored the possibility to pass path instead of io as a bonus!

Copy link
Owner

@skoji skoji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@skoji skoji merged commit 00bd03e into skoji:main May 15, 2024
18 checks passed
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.

File descriptor leak(?) in 1.0.16
3 participants