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

Archive Unpack results in corrupt file #322

Open
DrProfSgtMrJ opened this issue May 31, 2023 · 0 comments
Open

Archive Unpack results in corrupt file #322

DrProfSgtMrJ opened this issue May 31, 2023 · 0 comments

Comments

@DrProfSgtMrJ
Copy link

DrProfSgtMrJ commented May 31, 2023

I apologize if this isn't clear enough.

Currently, I'm attempting to download a tar.gz file from github, decode it (using GzDecoder) and unpack it.

This can be shown here:

 let path = "we-0.1.1-x86_64-apple-darwin.tar.gz";`
 let f = File::open(path).expect("Can't open file");
 let decode = GzDecoder::new(f);
 let mut archive = Archive::new(decode);
 archive.unpack("unarchive").expect("Can't unpack");

Note that the file is uploaded to github via a workflow and is archived using Tar (via the workflow).
This is on a MAC 13.1 (with M1 Chip). Using the tar command through the terminal will properly unpack it. However, using the above code results in a GNUSparseFile0.0 folder being created with the corrupted executable inside.

Let me know what other information is pertinent.

Similar issue: #295

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

No branches or pull requests

1 participant