Skip to content

Commit

Permalink
fsync(2) after writing
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed May 11, 2024
1 parent 401db56 commit 9eb1e59
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions helix-view/src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@ impl Document {
let write_result: anyhow::Result<_> = async {
let mut dst = tokio::fs::File::create(&write_path).await?;
to_writer(&mut dst, encoding_with_bom_info, &text).await?;
dst.sync_all().await?;
Ok(())
}
.await;
Expand Down

0 comments on commit 9eb1e59

Please sign in to comment.