aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Helpers/ProgressiveFileCopier.cs')
-rw-r--r--Jellyfin.Api/Helpers/ProgressiveFileCopier.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs b/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs
index e00ed3304..65c03c710 100644
--- a/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs
+++ b/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs
@@ -90,6 +90,11 @@ namespace Jellyfin.Api.Helpers
allowAsyncFileRead = true;
}
+ if (_path == null)
+ {
+ throw new NullReferenceException(nameof(_path));
+ }
+
await using var inputStream = new FileStream(_path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, IODefaults.FileStreamBufferSize, fileOptions);
var eofCount = 0;