From d7b88cc9c9d1e047a781062b908ef1a125b140f4 Mon Sep 17 00:00:00 2001 From: Horizontal42 <75383519+Horizontal42@users.noreply.github.com> Date: Wed, 12 Aug 2026 19:54:06 +0300 Subject: [PATCH] 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. --- src-tauri/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 9b008a2..49a40f5 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -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]