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

fix bug where all data blocks were not extracted to file #302

Merged
merged 1 commit into from
Mar 17, 2016

Conversation

reset
Copy link
Collaborator

@reset reset commented Mar 17, 2016

A loop around reading and writing data blocks was missing causing some files to be written out containing a bunch of null padding. This is because the header contains the size of the file to write and then the file is filled out by reading and writing through a buffer.

You can see the C example here which I built the library around when I made this mistake: https://github.com/libarchive/libarchive/blob/b9d0b46eb05b0f1e6c832512c2c6b5d782db58d1/examples/untar.c#L208-L220

@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

@adamhjk
Copy link
Contributor

adamhjk commented Mar 17, 2016

gif-keyboard-16972525634740496606

@adamhjk
Copy link
Contributor

adamhjk commented Mar 17, 2016

@delivery approve

chef-delivery added a commit that referenced this pull request Mar 17, 2016
Merged change 590f6b11-fd06-414e-a192-318fabcb312e

From review branch extract-all-blocks into master

Signed-off-by: adam <[email protected]>
@chef-delivery chef-delivery merged commit 7a5b070 into master Mar 17, 2016
@chef-delivery chef-delivery deleted the extract-all-blocks branch March 17, 2016 20:12
@chef-delivery
Copy link
Contributor

Change: 590f6b11-fd06-414e-a192-318fabcb312e approved by: @adamhjk

@chef-delivery
Copy link
Contributor

This PR has passed 'Acceptance' and is ready to be delivered!
Use: '@delivery deliver' when validated in acceptance.

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.

3 participants