From f1c6f63f4813330a9c9b9aac5d1acac43f1e3757 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Wed, 17 Feb 2021 15:12:18 -0500 Subject: [PATCH] sync_all final file --- lightning-persister/src/util.rs | 2 ++ 1 file changed, 2 insertions(+) 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(()) -- 2.39.5