diff --git a/src/commands/list.rs b/src/commands/list.rs index 5ddbd71..fc29b00 100644 --- a/src/commands/list.rs +++ b/src/commands/list.rs @@ -94,7 +94,9 @@ pub fn list_archive_contents( sevenz_rust::decompress_file_with_extract_fn(archive_path, ".", |entry, _, _| { a.borrow_mut().push(Ok(FileInArchive{path: entry.name().into(), is_dir: entry.is_directory()})); Ok(true) - }).expect("failed to get 7z file list"); + }).map_err( + |e| crate::Error::SevenzipError(e) + )?; Box::new(a.into_inner().into_iter()) } Gzip | Bzip | Lz4 | Lzma | Snappy | Zstd => {