aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/AppBase/ConfigurationHelper.cs
diff options
context:
space:
mode:
authorDavid <daullmer@gmail.com>2021-03-07 14:43:28 +0100
committerDavid <daullmer@gmail.com>2021-03-07 14:43:28 +0100
commit60ffa6f514656ed7256b555d483771c36164fce7 (patch)
tree537e88ee08f272b46f70a339c26d0d11e9487ee4 /Emby.Server.Implementations/AppBase/ConfigurationHelper.cs
parent22402650cb7668aaa74bfc2e7368aee50bf20542 (diff)
Use FileShare.None when creating files
Diffstat (limited to 'Emby.Server.Implementations/AppBase/ConfigurationHelper.cs')
-rw-r--r--Emby.Server.Implementations/AppBase/ConfigurationHelper.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/AppBase/ConfigurationHelper.cs b/Emby.Server.Implementations/AppBase/ConfigurationHelper.cs
index 77819c764..3f7076383 100644
--- a/Emby.Server.Implementations/AppBase/ConfigurationHelper.cs
+++ b/Emby.Server.Implementations/AppBase/ConfigurationHelper.cs
@@ -53,7 +53,8 @@ namespace Emby.Server.Implementations.AppBase
Directory.CreateDirectory(directory);
// Save it after load in case we got new items
- using (var fs = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read))
+ // use FileShare.None as this bypasses dotnet bug dotnet/runtime#42790 .
+ using (var fs = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None))
{
fs.Write(newBytes, 0, newBytesLen);
}