Delete profiles before overwriting
This commit is contained in:
@@ -65,6 +65,7 @@ impl ProfileWindow {
|
|||||||
.save_file();
|
.save_file();
|
||||||
if let Some(path) = file {
|
if let Some(path) = file {
|
||||||
let bytes = pollster::block_on(bytes_receiver)?;
|
let bytes = pollster::block_on(bytes_receiver)?;
|
||||||
|
let _ = fs::remove_file(&path);
|
||||||
fs::write(&path, bytes)?;
|
fs::write(&path, bytes)?;
|
||||||
Ok(Some(path.display().to_string()))
|
Ok(Some(path.display().to_string()))
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user