jmrenamer: print if a renamed filename already exists

This commit is contained in:
Lily Tsuru 2023-06-25 18:41:09 -04:00
parent d5f00adc95
commit 094c14a799
1 changed files with 2 additions and 0 deletions

View File

@ -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());
}
}