We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 261f13d commit 5b8b518Copy full SHA for 5b8b518
lightning-persister/src/util.rs
@@ -85,7 +85,10 @@ pub(crate) fn delete_file(dest_file: PathBuf) -> std::io::Result<bool> {
85
fs::remove_file(&dest_file)?;
86
let parent_directory = dest_file.parent().unwrap();
87
let dir_file = fs::OpenOptions::new().read(true).open(parent_directory)?;
88
- unsafe { libc::fsync(dir_file.as_raw_fd()); }
+ #[cfg(not(target_os = "windows"))]
89
+ {
90
+ unsafe { libc::fsync(dir_file.as_raw_fd()); }
91
+ }
92
93
if dest_file.is_file() {
94
return Err(std::io::Error::new(std::io::ErrorKind::Other, "Unpersisting key failed"));
0 commit comments