mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-10 15:42:01 +03:00
atomic write for deleted-sheet backups
fs::write left the one safety-net copy of a deleted sheet exposed to mid-write corruption; use the existing temp+rename helper like every other user-data write.
This commit is contained in:
parent
b399b95263
commit
d7b88cc9c9
1 changed files with 1 additions and 1 deletions
|
|
@ -611,7 +611,7 @@ fn backup_deleted_sheet(
|
|||
safe,
|
||||
chrono::Local::now().format("%Y-%m-%d-%H%M%S")
|
||||
);
|
||||
fs::write(bin.join(name), contents).map_err(|e| e.to_string())
|
||||
write_atomic(&bin.join(name), &contents)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue