From 4fcc3a396a3fd32549c897ebc9877b00e13f734a Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Tue, 16 Feb 2021 21:09:52 -0500 Subject: [PATCH] set dir readonly false --- 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 1de34055b..681c28b07 100644 --- a/lightning-persister/src/util.rs +++ b/lightning-persister/src/util.rs @@ -81,6 +81,8 @@ pub(crate) fn write_to_file(path: String, filename: String, da } #[cfg(target_os = "windows")] { + let mut dir_perms = fs::metadata(path.clone()).unwrap().permissions(); + dir_perms.set_readonly(false); if let Ok(metadata) = fs::metadata(filename_with_path.clone()) { let mut perms = metadata.permissions(); perms.set_readonly(false); -- 2.39.5