Delete profiles before overwriting

This commit is contained in:
Simon Gellis 2025-09-06 10:13:09 -04:00
parent 30ee8c06f7
commit 132d494cc2
1 changed files with 1 additions and 0 deletions

View File

@ -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 {