prevent panic on broken tar checksum

This commit is contained in:
phiresky 2019-06-16 22:48:28 +02:00
parent 47a59ea751
commit 7efd8638ce

View File

@ -48,7 +48,7 @@ impl FileAdapter for TarAdapter {
} = ai;
let mut archive = ::tar::Archive::new(&mut inp);
for entry in archive.entries()? {
let mut file = entry.unwrap();
let mut file = entry?;
if Regular == file.header().entry_type() {
let path = PathBuf::from(file.path()?.to_owned());
eprintln!(