fix: general impovements + recursive creation
This commit is contained in:
parent
2bacc48e17
commit
ef339297c3
1 changed files with 8 additions and 2 deletions
10
src/main.rs
10
src/main.rs
|
@ -117,6 +117,8 @@ fn main() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
println!("Selected: {}", actual_selection.join(", "));
|
||||||
|
|
||||||
let recursive: bool;
|
let recursive: bool;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
@ -225,9 +227,13 @@ fn move_file_to_directory(path: &Path, dir: &Path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if !dir.exists() {
|
if !dir.exists() {
|
||||||
match fs::create_dir(dir) {
|
match fs::create_dir_all(dir) {
|
||||||
Ok(_) => {}
|
Ok(_) => {}
|
||||||
Err(err) => eprintln!("Error creating destination directory: {}", err),
|
Err(err) => eprintln!(
|
||||||
|
"Error creating destination directory({}): {}",
|
||||||
|
dir.display(),
|
||||||
|
err
|
||||||
|
),
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue