diff options
| author | Bond-009 <bond.009@outlook.com> | 2021-05-21 13:05:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-21 13:05:03 +0200 |
| commit | d61530eb4b07ec19116773cdae1bb0d4cfa5d3d5 (patch) | |
| tree | f95281f1b7c50e0f69a94a98a52acc682819a511 /Jellyfin.Api/Helpers/TranscodingJobHelper.cs | |
| parent | a937a854f2582a8770d9ada7c24375065a21f7a5 (diff) | |
| parent | 7e8428e588b3f0a0574da44081098c64fe1a47d7 (diff) | |
Merge pull request #6083 from Bond-009/nullable4
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 5770c13d7..b4db0c83e 100644 --- a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs +++ b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs @@ -379,7 +379,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) |
