feat: add cli argument to specify whether to copy or move
This commit is contained in:
+1
-1
@@ -9,6 +9,7 @@ pub fn move_files(
|
||||
file_path: PathBuf,
|
||||
tag: Tag,
|
||||
extra_files: [String; 8],
|
||||
should_copy: bool,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let target_dir = PathBuf::from("/home/user/Desktop/coding/keks-sort");
|
||||
|
||||
@@ -33,7 +34,6 @@ pub fn move_files(
|
||||
let _ = create_dir_all(dir_to_create);
|
||||
let target = target_dir.join(artist_dir).join(album_dir.as_ref());
|
||||
|
||||
let should_copy = true;
|
||||
if should_copy {
|
||||
copy(&file_path, target.join(file_path.file_name().unwrap()))?;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user