diff --git a/crates/gitbutler-core/src/fs.rs b/crates/gitbutler-core/src/fs.rs index 1952e28cc..43a7d626b 100644 --- a/crates/gitbutler-core/src/fs.rs +++ b/crates/gitbutler-core/src/fs.rs @@ -87,7 +87,12 @@ fn persist_tempfile( to_path: impl AsRef, ) -> std::io::Result<()> { match tempfile.persist(to_path) { - Ok(Some(_opened_file)) => Ok(()), + Ok(Some(_opened_file)) => { + // EXPERIMENT: Does this fix #3601? + #[cfg(windows)] + _opened_file.sync_all()?; + Ok(()) + } Ok(None) => unreachable!( "BUG: a signal has caused the tempfile to be removed, but we didn't install a handler" ),