Skip to content

Commit 716a455

Browse files
committed
refactor(hm-util): use atomic_rename_over_sync in write_atomic_restricted
1 parent 775d1d5 commit 716a455

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/hm-util/src/os

crates/hm-util/src/os/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn write_atomic_restricted_sync(
3939

4040
write_file_with_mode_sync(&tmp_path, contents, file_mode)?;
4141

42-
let persist_result = std::fs::rename(&tmp_path, path);
42+
let persist_result = atomic_rename_over_sync(&tmp_path, path);
4343
if persist_result.is_err() {
4444
let _ = std::fs::remove_file(&tmp_path);
4545
}

0 commit comments

Comments
 (0)