diff options
| author | crobibero <cody@robibe.ro> | 2020-11-13 11:14:44 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-11-13 11:14:44 -0700 |
| commit | 5f52a58e785fa4ae06fa07a93b81c1e7547ac9f3 (patch) | |
| tree | 68466ae2c11051e631a4cf06a43cf14da1f4d756 /Jellyfin.Api/Helpers/ProgressiveFileCopier.cs | |
| parent | be312f992d92433e3e7619e264889d1a0afadf26 (diff) | |
Convert NullReferenceException to ResourceNotFoundException
Diffstat (limited to 'Jellyfin.Api/Helpers/ProgressiveFileCopier.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/ProgressiveFileCopier.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs b/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs index 65c03c710..8bddf00d5 100644 --- a/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs +++ b/Jellyfin.Api/Helpers/ProgressiveFileCopier.cs @@ -5,6 +5,7 @@ using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; using Jellyfin.Api.Models.PlaybackDtos; +using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Library; using MediaBrowser.Model.IO; @@ -92,7 +93,7 @@ namespace Jellyfin.Api.Helpers if (_path == null) { - throw new NullReferenceException(nameof(_path)); + throw new ResourceNotFoundException(nameof(_path)); } await using var inputStream = new FileStream(_path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, IODefaults.FileStreamBufferSize, fileOptions); |
