Make logging consistant for zip

This commit is contained in:
Nbiba Bedis 2021-11-16 09:39:10 +01:00
parent a87b89073e
commit ba617fdea8

View File

@ -356,7 +356,7 @@ fn decompress_file(
// Any other Zip decompression done can take up the whole RAM and freeze ouch. // Any other Zip decompression done can take up the whole RAM and freeze ouch.
if formats.len() == 1 && *formats[0].compression_formats == [Zip] { if formats.len() == 1 && *formats[0].compression_formats == [Zip] {
let zip_archive = zip::ZipArchive::new(reader)?; let zip_archive = zip::ZipArchive::new(reader)?;
let _files = if let ControlFlow::Continue(files) = smart_unpack( let files = if let ControlFlow::Continue(files) = smart_unpack(
Box::new(move |output_dir| crate::archive::zip::unpack_archive(zip_archive, output_dir, question_policy)), Box::new(move |output_dir| crate::archive::zip::unpack_archive(zip_archive, output_dir, question_policy)),
output_dir, output_dir,
&output_file_path, &output_file_path,
@ -367,6 +367,7 @@ fn decompress_file(
return Ok(()); return Ok(());
}; };
info!("Successfully decompressed archive in {}.", nice_directory_display(output_dir)); info!("Successfully decompressed archive in {}.", nice_directory_display(output_dir));
info!("Files unpacked: {}", files.len());
return Ok(()); return Ok(());
} }