diff --git a/src/archive/tar.rs b/src/archive/tar.rs index 68d51d23a..2c134b403 100644 --- a/src/archive/tar.rs +++ b/src/archive/tar.rs @@ -80,11 +80,12 @@ pub fn unpack_archive(reader: impl Read, output_folder: &Path) -> Result { _ => continue, } - info!( - "extracted ({}) {}", - BytesFmt(entry.size()), - PathFmt(&output_folder.join(entry.path()?)), - ); + let full_path = output_folder.join(entry.path()?); + if entry.header().entry_type().is_dir() { + info!("Directory {} created", PathFmt(&full_path)); + } else { + info!("extracted ({}) {}", BytesFmt(entry.size()), PathFmt(&full_path)); + } files_unpacked += 1; } diff --git a/src/archive/zip.rs b/src/archive/zip.rs index 5a60cc913..5ef555c0e 100644 --- a/src/archive/zip.rs +++ b/src/archive/zip.rs @@ -53,7 +53,7 @@ where match file.name().ends_with('/') { _is_dir @ true => { - info!("File {} extracted to {}", idx, PathFmt(&file_path)); + info!("Directory {} created", PathFmt(&file_path)); let mode = file.unix_mode(); let is_symlink = mode.is_some_and(|mode| mode & 0o170000 == 0o120000); diff --git a/tests/snapshots/ui__ui_test_ok_decompress_multiple_files.snap b/tests/snapshots/ui__ui_test_ok_decompress_multiple_files.snap index b97d95e7c..5ea40b194 100644 --- a/tests/snapshots/ui__ui_test_ok_decompress_multiple_files.snap +++ b/tests/snapshots/ui__ui_test_ok_decompress_multiple_files.snap @@ -2,9 +2,9 @@ source: tests/ui.rs expression: "lines.join(\"\\n\")" --- +[INFO] Directory "output/input" created [INFO] Files unpacked: 4 [INFO] Successfully decompressed archive to "output" -[INFO] extracted ( [SIZE]) "output/input" [INFO] extracted ( [SIZE]) "output/input/input" [INFO] extracted ( [SIZE]) "output/input/input2" [INFO] extracted ( [SIZE]) "output/input/input3"