From a07bc72faf46b452db17dc9bb793897654e7dfaf Mon Sep 17 00:00:00 2001 From: Nbiba Bedis Date: Wed, 8 Dec 2021 13:46:57 +0100 Subject: [PATCH] Show info for list --tree --- src/list.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/list.rs b/src/list.rs index fa8d148..a3d7596 100644 --- a/src/list.rs +++ b/src/list.rs @@ -1,8 +1,12 @@ //! Implementation of the 'list' command, print list of files in an archive -use std::path::{Path, PathBuf}; +use std::{ + io::Write, + path::{Path, PathBuf}, +}; use self::tree::Tree; +use crate::info; /// Options controlling how archive contents should be listed #[derive(Debug, Clone, Copy)] @@ -31,7 +35,14 @@ pub fn list_files( println!("Archive: {}", archive.display()); if list_options.tree { - let tree: Tree = files.into_iter().collect::>()?; + let tree: Tree = files + .into_iter() + .map(|file| { + let file = file?; + info!(inaccessible, "Processing file: {}", file.path.display()); + Ok(file) + }) + .collect::>()?; tree.print(); } else { for file in files {