This commit is contained in:
SpikeHD
2022-07-27 17:01:55 -07:00
parent 281bfb5cea
commit a843888cb8
3 changed files with 10 additions and 4 deletions

View File

@@ -18,7 +18,14 @@ pub fn rename(path: String, new_name: String) {
let path_replaced = &path.replace(&new_path.split('/').last().unwrap(), &new_name);
fs::rename(path, &path_replaced).unwrap();
match fs::rename(&path, &path_replaced) {
Ok(_) => {
println!("Renamed {} to {}", &path, path_replaced);
}
Err(e) => {
println!("Error: {}", e);
}
};
}
#[tauri::command]