diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2021-03-07 19:37:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-07 19:37:21 -0500 |
| commit | 480dd66428e2a8bf76c0747256f2e99b15aae212 (patch) | |
| tree | bef28343d50450344901a59f98ce5120a869f8e9 /Emby.Server.Implementations/AppBase/ConfigurationHelper.cs | |
| parent | bc95268bd6a81db3f8e1c192aad48df5b879d231 (diff) | |
| parent | 60ffa6f514656ed7256b555d483771c36164fce7 (diff) | |
Merge pull request #5402 from Ullmie02/fix-null-size
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); } |
