From bf75226bf98b8d37fa0a23288aefa47f91ac9875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=99=E7=A9=8F=E9=9D=84?= <170472707+seionmoya@users.noreply.github.com> Date: Sun, 8 Sep 2024 03:37:39 +0200 Subject: [PATCH] Override file when writing to it --- Fuyu.Common/IO/VFS.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fuyu.Common/IO/VFS.cs b/Fuyu.Common/IO/VFS.cs index 06138062..4d65e702 100644 --- a/Fuyu.Common/IO/VFS.cs +++ b/Fuyu.Common/IO/VFS.cs @@ -63,7 +63,7 @@ public static void WriteTextFile(string filepath, string text) CreateDirectory(path); } - using (var fs = new FileStream(filepath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None)) + using (var fs = new FileStream(filepath, FileMode.Create, FileAccess.Write, FileShare.None)) { using (var sw = new StreamWriter(fs)) {