fix: skip empty dir removal on single files and skip if dir is not empty

This commit is contained in:
2026-09-01 20:48:40 +02:00
parent 25a23af701
commit f8a51ccd48
2 changed files with 9 additions and 3 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
}
let tag = get_metadata(&path);
if let Err(e) =
move_files(path.clone(), tag.clone(), extra_files.clone(), *copy)
move_files(path.clone(), tag.clone(), extra_files.clone(), *copy, true)
{
eprintln!("Failed to import {:?}: {}", path, e);
}
@@ -60,7 +60,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
} else {
println!("Importing file: {:?}", file);
let tag = get_metadata(file);
move_files(file.clone(), tag.clone(), extra_files, *copy)?;
move_files(file.clone(), tag.clone(), extra_files, *copy, false)?;
}
}
Commands::Show { file } => {