From c7e142c461e5ff0f56f5f3251c11d67d285a1336 Mon Sep 17 00:00:00 2001 From: Qstick Date: Thu, 26 Jan 2023 19:59:09 -0600 Subject: [PATCH] Fixed: Argument Exception when folder cleaning on track delete --- src/NzbDrone.Core/MediaFiles/MediaFileDeletionService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/MediaFiles/MediaFileDeletionService.cs b/src/NzbDrone.Core/MediaFiles/MediaFileDeletionService.cs index 582b3dcee..09db6b0d2 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaFileDeletionService.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaFileDeletionService.cs @@ -164,7 +164,7 @@ namespace NzbDrone.Core.MediaFiles { _diskProvider.DeleteFolder(artist.Path, true); } - else if (_diskProvider.GetFiles(albumFolder, SearchOption.AllDirectories).Empty()) + else if (albumFolder.IsNotNullOrWhiteSpace() && _diskProvider.GetFiles(albumFolder, SearchOption.AllDirectories).Empty()) { _diskProvider.RemoveEmptySubfolders(albumFolder); }