From: Valentine Wallace Date: Wed, 17 Feb 2021 20:12:18 +0000 (-0500) Subject: sync_all final file X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=f1c6f63f4813330a9c9b9aac5d1acac43f1e3757;p=rust-lightning sync_all final file --- diff --git a/lightning-persister/src/util.rs b/lightning-persister/src/util.rs index d568af561..132c20687 100644 --- a/lightning-persister/src/util.rs +++ b/lightning-persister/src/util.rs @@ -112,6 +112,8 @@ pub(crate) fn write_to_file(path: String, filename: String, da winapi::um::winbase::MOVEFILE_WRITE_THROUGH | winapi::um::winbase::MOVEFILE_REPLACE_EXISTING )}); } + let mut final_file = fs::File::open(filename_with_path.clone())?; + final_file.sync_all()?; println!("VMW: renamed"); } Ok(())