From f2bd8470926686361602e545d63a69d4bfc22f90 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 11 Sep 2019 15:03:17 +0200 Subject: [PATCH] Ignore tar header entries In particular, these are emitted by 'git archive' (in fetchGit). --- nix-rust/src/tarfile.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/nix-rust/src/tarfile.rs b/nix-rust/src/tarfile.rs index 797aa5064..9e32a3f00 100644 --- a/nix-rust/src/tarfile.rs +++ b/nix-rust/src/tarfile.rs @@ -37,6 +37,7 @@ pub fn unpack_tarfile(source: Source, dest_dir: &str) -> Result<(), Error> { tar::EntryType::Symlink => { std::os::unix::fs::symlink(file.header().link_name()?.unwrap(), dest_file)?; } + tar::EntryType::XGlobalHeader | tar::EntryType::XHeader => {} t => return Err(Error::Misc(format!("unsupported tar entry type '{:?}'", t))), } }