Explorar o código

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

Bepis %!s(int64=4) %!d(string=hai) anos
pai
achega
f51ad82619
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)
 					{