mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 03:55:28 +00:00
feat: good error handling
This commit is contained in:
parent
d825feaeff
commit
76a459e02e
@ -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 => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user