Closed chshersh closed 2 years ago
I'm using flate2 in my Cargo.toml like this:
flate2
Cargo.toml
flate2 = "1.0"
When I'm trying to unpack tokei-x86_64-apple-darwin.tar.gz using the following code:
fn unpack_tar(tar_path: &PathBuf, tmp_dir: &Path) -> Result<(), std::io::Error> { let tar_file = File::open(tar_path)?; let tar_decoder = GzDecoder::new(tar_file); let mut archive = tar::Archive::new(tar_decoder); archive.unpack(tmp_dir) }
I see that the unpacking result produces the GNUSparseFile.0 directory:
GNUSparseFile.0
$ exa --tree . ├── GNUSparseFile.0 │ └── tokei └── tokei-x86_64-apple-darwin.tar.gz
I'm not sure if the file actually valid (since I'm on Ubuntu 20.04 and the archive contents a macOS executable so I can't run it). But is this expected and can/should it be fixed?
Seems to be an issue in the tar crate:
tar
Closing in favour of the issue in another repository. But maybe it'll help somebody to discover it 😌
I'm using
flate2
in myCargo.toml
like this:When I'm trying to unpack tokei-x86_64-apple-darwin.tar.gz using the following code:
I see that the unpacking result produces the
GNUSparseFile.0
directory:I'm not sure if the file actually valid (since I'm on Ubuntu 20.04 and the archive contents a macOS executable so I can't run it). But is this expected and can/should it be fixed?