diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-10-13 19:08:00 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-12-07 16:43:59 +0100 |
| commit | b366dc2e6e5be2b93f2b6fcc4549a32b655c3806 (patch) | |
| tree | 8f7ee8407e31e58db9aabe74bfc21936275ec45e /Emby.Server.Implementations/Playlists | |
| parent | 93fd462b581207d937c5d4eb939b1cc96c86c1f2 (diff) | |
Use ArgumentException.ThrowIfNullOrEmpty
Diffstat (limited to 'Emby.Server.Implementations/Playlists')
| -rw-r--r-- | Emby.Server.Implementations/Playlists/PlaylistManager.cs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs index 271c0bc4d..2717c392b 100644 --- a/Emby.Server.Implementations/Playlists/PlaylistManager.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs @@ -502,15 +502,8 @@ namespace Emby.Server.Implementations.Playlists private static string MakeRelativePath(string folderPath, string fileAbsolutePath) { - if (string.IsNullOrEmpty(folderPath)) - { - throw new ArgumentException("Folder path was null or empty.", nameof(folderPath)); - } - - if (string.IsNullOrEmpty(fileAbsolutePath)) - { - throw new ArgumentException("File absolute path was null or empty.", nameof(fileAbsolutePath)); - } + ArgumentException.ThrowIfNullOrEmpty(folderPath); + ArgumentException.ThrowIfNullOrEmpty(fileAbsolutePath); if (!folderPath.EndsWith(Path.DirectorySeparatorChar)) { |
