Use ArgumentException.ThrowIfNullOrEmpty

This commit is contained in:
Bond_009
2022-10-13 19:08:00 +02:00
parent 93fd462b58
commit b366dc2e6e
58 changed files with 130 additions and 549 deletions

View File

@@ -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))
{