From 6b2fb81bbb901537a768c0f6ecafcac4a496389e Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Wed, 17 Feb 2021 13:31:10 -0500 Subject: [PATCH] no backup file --- lightning-persister/src/util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightning-persister/src/util.rs b/lightning-persister/src/util.rs index 86f5dcba3..2b6588869 100644 --- a/lightning-persister/src/util.rs +++ b/lightning-persister/src/util.rs @@ -100,11 +100,11 @@ pub(crate) fn write_to_file(path: String, filename: String, da // path_to_windows_str(src).as_ptr(), path_to_windows_str(dst).as_ptr(), // winapi::um::winbase::MOVEFILE_WRITE_THROUGH | winapi::um::winbase::MOVEFILE_REPLACE_EXISTING // )}); - let backup_filepath = PathBuf::from(format!("{}.backup", filename_with_path.clone())); + // let backup_filepath = PathBuf::from(format!("{}.backup", filename_with_path.clone())); if Path::new(&filename_with_path.clone()).exists() { unsafe {winapi::um::winbase::ReplaceFileW( - path_to_windows_str(src).as_ptr(), path_to_windows_str(dst).as_ptr(), path_to_windows_str(backup_filepath).as_ptr(), + path_to_windows_str(src).as_ptr(), path_to_windows_str(dst).as_ptr(), std::ptr::null(), winapi::um::winbase::REPLACEFILE_IGNORE_MERGE_ERRORS, std::ptr::null_mut() as *mut winapi::ctypes::c_void, std::ptr::null_mut() as *mut winapi::ctypes::c_void )}; } else { -- 2.39.5