From 8213f16c47cc22474c77b79532d38adf415fd8b3 Mon Sep 17 00:00:00 2001 From: timvisee Date: Tue, 6 Feb 2024 15:05:13 +0100 Subject: [PATCH] Specify truncation behavior when opening new segment file --- src/segment.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/segment.rs b/src/segment.rs index f0e76fb..4084697 100644 --- a/src/segment.rs +++ b/src/segment.rs @@ -152,6 +152,7 @@ impl Segment { .read(true) .write(true) .create(true) + .truncate(true) .open(&tmp_file_path)?; // fs4 provides some cross-platform bindings which help for Windows.