emergency metadata recovery

This commit is contained in:
SpikeHD
2022-07-15 19:35:57 -07:00
parent a1b0fec871
commit bd54a78e4b
7 changed files with 88 additions and 2 deletions

View File

@@ -66,7 +66,13 @@ pub fn copy_file_with_new_name(path: String, new_path: String, new_name: String)
// If the new path doesn't exist, create it.
if !dir_exists(new_path_buf.pop().to_string().as_str()) {
std::fs::create_dir_all(&new_path).unwrap();
match std::fs::create_dir_all(&new_path) {
Ok(_) => {}
Err(e) => {
println!("Failed to create directory: {}", e);
return false;
}
};
}
// Copy old to new