* Fix https://github.com/tauri-apps/tauri/issues/7973 * Fix https://github.com/tauri-apps/tauri/issues/7973 * Fix https://github.com/tauri-apps/tauri/issues/7973
@@ -0,0 +1,5 @@
+---
+"tauri": 'patch:bug'
+
+Set the correct `truncate` option on `OpenOptions` so that `write_file` can completely overwrite existing files.
@@ -188,6 +188,7 @@ impl Cmd {
.append(append)
.write(true)
.create(true)
+ .truncate(!append)
.open(&resolved_path)
.with_context(|| format!("path: {}", resolved_path.display()))
.map_err(Into::into)