From 6c7d24084f5ea1c8bf874965570c07e3e80da555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Rodrigues=20Miguel?= Date: Sun, 21 Mar 2021 21:42:13 -0300 Subject: [PATCH] decompressors.tar: Add info messages --- src/decompressors/tar.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/decompressors/tar.rs b/src/decompressors/tar.rs index 1bc1ec8..c7a39cf 100644 --- a/src/decompressors/tar.rs +++ b/src/decompressors/tar.rs @@ -17,6 +17,7 @@ impl TarDecompressor { fn unpack_files(from: &Path, into: &Path) -> OuchResult> { + println!("{}: attempting to decompress {:?}", "ouch".bright_blue(), from); let mut files_unpacked = vec![]; let file = fs::File::open(from)?; @@ -27,7 +28,14 @@ impl TarDecompressor { // TODO: check if file/folder already exists and ask user's permission for overwriting file.unpack_in(into)?; - + + println!( + "{}: {:?} extracted. ({} bytes)", + "info".yellow(), + into.join(file.path()?), + file.size() + ); + let file_path = fs::canonicalize(into.join(file.path()?))?; files_unpacked.push(file_path); }