From 094c14a79919cd401b07fc31a843911b35620f24 Mon Sep 17 00:00:00 2001 From: modeco80 Date: Sun, 25 Jun 2023 18:41:09 -0400 Subject: [PATCH] jmrenamer: print if a renamed filename already exists --- crates/jmrenamer/src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/jmrenamer/src/main.rs b/crates/jmrenamer/src/main.rs index 391e9ff..5ee58fa 100644 --- a/crates/jmrenamer/src/main.rs +++ b/crates/jmrenamer/src/main.rs @@ -59,6 +59,8 @@ fn main() -> io::Result<()> { if src_path.exists() { fs::rename(src_path, dest_path)?; println!("moved {} -> {}", src_path.display(), dest_path.display()); + } else if dest_path.exists() { + println!("{} already exists", dest_path.display()); } }