From d05cb40088a51eef5a2830bf2b55f5d05955578f Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 18 Aug 2023 16:56:32 -0700 Subject: [PATCH] Fixed: Ignore IOException deleting download folder after import Closes #5937 --- .../MediaFiles/DownloadedEpisodesImportService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs b/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs index be2a6ff5a..f7afddebc 100644 --- a/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs +++ b/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs @@ -212,7 +212,15 @@ private List ProcessFolder(DirectoryInfo directoryInfo, ImportMode ShouldDeleteFolder(directoryInfo, series)) { _logger.Debug("Deleting folder after importing valid files"); - _diskProvider.DeleteFolder(directoryInfo.FullName, true); + + try + { + _diskProvider.DeleteFolder(directoryInfo.FullName, true); + } + catch (IOException e) + { + _logger.Debug(e, "Unable to delete folder after importing: {0}", e.Message); + } } else if (importResults.Empty()) {