Skip to content

Commit

Permalink
Don't truncate on creation, we do it manually after
Browse files Browse the repository at this point in the history
  • Loading branch information
timvisee committed Feb 7, 2024
1 parent 8213f16 commit 3f5ed8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ impl Segment {
.read(true)
.write(true)
.create(true)
.truncate(true)
// Don't truncate now, we do it manually later to allocate the right size directly
.truncate(false)
.open(&tmp_file_path)?;

// fs4 provides some cross-platform bindings which help for Windows.
Expand Down

0 comments on commit 3f5ed8f

Please sign in to comment.