Skip to content

Commit 6d83145

Browse files
committed
f Fix windows
1 parent 2d6f256 commit 6d83145

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lightning-storage/src/fs_store.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ impl KVStore for FilesystemStore {
9999
let ext = format!("{}.tmp", rand_str);
100100
tmp_file_path.set_extension(ext);
101101

102-
let mut tmp_file = fs::File::create(&tmp_file_path)?;
103-
tmp_file.write_all(&buf)?;
104-
tmp_file.sync_all()?;
102+
{
103+
let mut tmp_file = fs::File::create(&tmp_file_path)?;
104+
tmp_file.write_all(&buf)?;
105+
tmp_file.sync_all()?;
106+
}
105107

106108
#[cfg(not(target_os = "windows"))]
107109
{

0 commit comments

Comments
 (0)