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:
Horizontal42 2026-08-12 19:54:06 +03:00
parent b399b95263
commit d7b88cc9c9

View file

@ -611,7 +611,7 @@ fn backup_deleted_sheet(
safe, safe,
chrono::Local::now().format("%Y-%m-%d-%H%M%S") 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] #[tauri::command]