From 33b8da573bef56fe4279bc67f9b9d0c3a74282f7 Mon Sep 17 00:00:00 2001 From: Gwo Tzu-Hsing Date: Mon, 22 Jul 2024 13:57:52 +0800 Subject: [PATCH] chore: specify truncate mode of openning file explictly --- src/fs/tokio.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fs/tokio.rs b/src/fs/tokio.rs index 338db1c3..0d01a5ce 100644 --- a/src/fs/tokio.rs +++ b/src/fs/tokio.rs @@ -11,6 +11,7 @@ impl FileProvider for TokioExecutor { async fn open(path: impl AsRef) -> io::Result { OpenOptions::new() + .truncate(false) .create(true) .write(true) .read(true)