diff options
| author | David <daullmer@gmail.com> | 2021-03-07 14:43:28 +0100 |
|---|---|---|
| committer | David <daullmer@gmail.com> | 2021-03-07 14:43:28 +0100 |
| commit | 60ffa6f514656ed7256b555d483771c36164fce7 (patch) | |
| tree | 537e88ee08f272b46f70a339c26d0d11e9487ee4 /Emby.Server.Implementations/AppBase/ConfigurationHelper.cs | |
| parent | 22402650cb7668aaa74bfc2e7368aee50bf20542 (diff) | |
Use FileShare.None when creating files
Diffstat (limited to 'Emby.Server.Implementations/AppBase/ConfigurationHelper.cs')
| -rw-r--r-- | Emby.Server.Implementations/AppBase/ConfigurationHelper.cs | 3 |
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); } |
