mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-28 11:44:48 +03:00
Convert NullReferenceException to ResourceNotFoundException
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user