mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-28 22:03:30 +03:00
remove Windows experiment (#3601)
The sync-all didn't do anything, and one would still run into locked files.
This commit is contained in:
parent
1dc8988c3c
commit
a176bf04cf
@ -85,18 +85,12 @@ pub(crate) fn create_dirs_then_write<P: AsRef<Path>>(
|
||||
persist_tempfile(temp_file, file_path)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn persist_tempfile(
|
||||
tempfile: gix::tempfile::Handle<gix::tempfile::handle::Writable>,
|
||||
to_path: impl AsRef<Path>,
|
||||
) -> std::io::Result<()> {
|
||||
match tempfile.persist(to_path) {
|
||||
Ok(Some(_opened_file)) => {
|
||||
// EXPERIMENT: Does this fix #3601?
|
||||
#[cfg(windows)]
|
||||
_opened_file.sync_all()?;
|
||||
Ok(())
|
||||
}
|
||||
Ok(Some(_opened_file)) => Ok(()),
|
||||
Ok(None) => unreachable!(
|
||||
"BUG: a signal has caused the tempfile to be removed, but we didn't install a handler"
|
||||
),
|
||||
|
@ -17,7 +17,6 @@ test = false
|
||||
tauri-build = { version = "1.5", features = [] }
|
||||
|
||||
[dev-dependencies]
|
||||
#once_cell = "1.19"
|
||||
pretty_assertions = "1.4"
|
||||
tempfile = "3.10"
|
||||
gitbutler-testsupport.workspace = true
|
||||
|
Loading…
Reference in New Issue
Block a user