Skip to content

Commit 5b8b518

Browse files
committed
f Do we really support Windows?
1 parent 261f13d commit 5b8b518

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lightning-persister/src/util.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ pub(crate) fn delete_file(dest_file: PathBuf) -> std::io::Result<bool> {
8585
fs::remove_file(&dest_file)?;
8686
let parent_directory = dest_file.parent().unwrap();
8787
let dir_file = fs::OpenOptions::new().read(true).open(parent_directory)?;
88-
unsafe { libc::fsync(dir_file.as_raw_fd()); }
88+
#[cfg(not(target_os = "windows"))]
89+
{
90+
unsafe { libc::fsync(dir_file.as_raw_fd()); }
91+
}
8992

9093
if dest_file.is_file() {
9194
return Err(std::io::Error::new(std::io::ErrorKind::Other, "Unpersisting key failed"));

0 commit comments

Comments
 (0)