summaryrefslogtreecommitdiffstats
path: root/nix-rust
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-09-11 15:03:17 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-11-26 22:07:28 +0100
commitf2bd8470926686361602e545d63a69d4bfc22f90 (patch)
tree5a4761fc4f00e210587a3e8726c56ad5ba4dacfa /nix-rust
parentd33dd6e6c09d87a59989057ad622a6265ddec2e0 (diff)
Ignore tar header entries
In particular, these are emitted by 'git archive' (in fetchGit).
Diffstat (limited to 'nix-rust')
-rw-r--r--nix-rust/src/tarfile.rs1
1 files changed, 1 insertions, 0 deletions
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))),
}
}