diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-05-20 21:28:18 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2021-05-20 22:48:53 +0200 |
| commit | 7e8428e588b3f0a0574da44081098c64fe1a47d7 (patch) | |
| tree | 4dd11afc9e5b38d46366a9fea207e1dbb82a3e56 /Jellyfin.Api/Helpers/TranscodingJobHelper.cs | |
| parent | e8790bfa963284863dc1126a83df72309ec30561 (diff) | |
Enable nullable reference types for Emby.Server.Implementations
Diffstat (limited to 'Jellyfin.Api/Helpers/TranscodingJobHelper.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/TranscodingJobHelper.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs index 0879cbd18..7cb015993 100644 --- a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs +++ b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs @@ -380,7 +380,9 @@ namespace Jellyfin.Api.Helpers /// <param name="outputFilePath">The output file path.</param> private void DeleteHlsPartialStreamFiles(string outputFilePath) { - var directory = Path.GetDirectoryName(outputFilePath); + var directory = Path.GetDirectoryName(outputFilePath) + ?? throw new ArgumentException("Path can't be a root directory.", nameof(outputFilePath)); + var name = Path.GetFileNameWithoutExtension(outputFilePath); var filesToDelete = _fileSystem.GetFilePaths(directory) |
