don't panic if file already exists
This commit is contained in:
parent
ef4d2816b3
commit
2b5ddee232
|
@ -39,8 +39,10 @@ fn move_file(file: PathBuf, mut destination: PathBuf) {
|
|||
|
||||
destination.push(file_name);
|
||||
|
||||
fs_extra::file::move_file(file, destination, &Default::default())
|
||||
.expect("Couldn't move file");
|
||||
match fs_extra::file::move_file(file, destination, &Default::default()) {
|
||||
Ok(_) => println!("OK!"),
|
||||
Err(e) => println!("Couldn't move file: {:?}", e),
|
||||
}
|
||||
}
|
||||
|
||||
fn yes() -> bool {
|
||||
|
|
Loading…
Reference in New Issue