瀏覽代碼

Fix sharing violation on config file save in some rare cases
Rebase of 541ab9e218faa9a8c601f85cc7c550b904fbe572

Bepis 4 年之前
父節點
當前提交
f51ad82619
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      BepInEx.Core/Configuration/ConfigFile.cs

+ 1 - 1
BepInEx.Core/Configuration/ConfigFile.cs

@@ -149,7 +149,7 @@ namespace BepInEx.Configuration
 				string directoryName = Path.GetDirectoryName(ConfigFilePath);
 				if (directoryName != null) Directory.CreateDirectory(directoryName);
 
-				using (var writer = new StreamWriter(File.Create(ConfigFilePath), Encoding.UTF8))
+				using (var writer = new StreamWriter(ConfigFilePath, false, Encoding.UTF8))
 				{
 					if (_ownerMetadata != null)
 					{