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

Handle stored files with general purpose bit 3 set #358

Merged
merged 1 commit into from Apr 23, 2018

Conversation

@idoru
Copy link

@idoru idoru commented Apr 3, 2018

In these cases, the @current_entry is unpacked from the local headers, but the size/compressed size/crc are all set to 0, which causes the PassThruDecompressor to read no bytes instead of the entry size.

This change makes Entry#get_input_stream pass the Entry itself down to Zip::InputStream so that when creating the Decompressor, it can be constructed with the correct number of bytes to be read (iff general purpose bit 3 is set and the size is 0).

May be related to #236 #295

Signed-off-by: Sam Coward scoward@pivotal.io

Signed-off-by: Sam Coward <scoward@pivotal.io>
@coveralls
Copy link

@coveralls coveralls commented Apr 3, 2018

Coverage Status

Coverage increased (+0.005%) to 96.526% when pulling c787d94 on idoru:handle-gpbit-3 into 05af123 on rubyzip:master.

@sclevine
Copy link

@sclevine sclevine commented Apr 23, 2018

@simonoff @olleolleolle any feedback? We'd like to use rubyzip in Cloud Foundry's Cloud Controller, but we're blocked on this PR.

@simonoff simonoff merged commit f073f64 into rubyzip:master Apr 23, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.005%) to 96.526%
Details
@sclevine
Copy link

@sclevine sclevine commented Apr 23, 2018

Thanks!

This was referenced Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants