Skip to content

Commit de8072c

Browse files
authored
Flush keyfile during creation (#8717)
Fixes #8710
1 parent bd22075 commit de8072c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sled-storage/src/keyfile.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ impl KeyFile {
3131
// We want to overwrite any existing contents.
3232
let mut file = tokio::fs::File::create(&path.0).await?;
3333
file.write_all(key).await?;
34+
file.flush().await?;
3435
info!(log, "Created keyfile"; "path" => ?path);
3536
Ok(KeyFile {
3637
path,

0 commit comments

Comments
 (0)