From bda0bd9bbc99d990e74d6d5bc878b33b1be3bcc1 Mon Sep 17 00:00:00 2001 From: Ken Chou Date: Wed, 6 Dec 2023 22:27:39 +0800 Subject: [PATCH] skip parent tmp --- src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index c74621c..48de146 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,7 +34,6 @@ enum Operation { RENAME, } -#[allow(dead_code)] #[derive(Debug)] struct AppOptions { enable_deletion: bool, @@ -48,7 +47,6 @@ struct AppOptions { target_path: PathBuf, } -#[allow(dead_code)] impl AppOptions { fn is_debug_mode(&self) -> bool { return self.verbose >= 3; @@ -406,7 +404,7 @@ fn main() -> std::io::Result<()> { .then(a.file_name().cmp(&b.file_name())) }) .into_iter() - .filter_entry(|e| is_not_hidden(e)) + .filter_entry(|e| !app_options.skip_parent_tmp || is_not_hidden(e)) .filter_map(|e| e.ok()) { let filepath = entry.path();