aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ItemLookupController.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2021-03-07 19:37:21 -0500
committerGitHub <noreply@github.com>2021-03-07 19:37:21 -0500
commit480dd66428e2a8bf76c0747256f2e99b15aae212 (patch)
treebef28343d50450344901a59f98ce5120a869f8e9 /Jellyfin.Api/Controllers/ItemLookupController.cs
parentbc95268bd6a81db3f8e1c192aad48df5b879d231 (diff)
parent60ffa6f514656ed7256b555d483771c36164fce7 (diff)
Merge pull request #5402 from Ullmie02/fix-null-size
Use FileShare.None when creating files
Diffstat (limited to 'Jellyfin.Api/Controllers/ItemLookupController.cs')
-rw-r--r--Jellyfin.Api/Controllers/ItemLookupController.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/ItemLookupController.cs b/Jellyfin.Api/Controllers/ItemLookupController.cs
index dfc68ffce..dabd4deb7 100644
--- a/Jellyfin.Api/Controllers/ItemLookupController.cs
+++ b/Jellyfin.Api/Controllers/ItemLookupController.cs
@@ -344,11 +344,12 @@ namespace Jellyfin.Api.Controllers
Directory.CreateDirectory(directory);
using (var stream = result.Content)
{
+ // use FileShare.None as this bypasses dotnet bug dotnet/runtime#42790 .
await using var fileStream = new FileStream(
fullCachePath,
FileMode.Create,
FileAccess.Write,
- FileShare.Read,
+ FileShare.None,
IODefaults.FileStreamBufferSize,
true);