From 7efd8638ce7411dcae208dcef14cdecf6796e364 Mon Sep 17 00:00:00 2001 From: phiresky Date: Sun, 16 Jun 2019 22:48:28 +0200 Subject: [PATCH] prevent panic on broken tar checksum --- src/adapters/tar.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapters/tar.rs b/src/adapters/tar.rs index 7045832..31119a1 100644 --- a/src/adapters/tar.rs +++ b/src/adapters/tar.rs @@ -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!(