From f657afc4241f4519e365bbd36c53701ba0c0ae86 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 31 Jul 2014 23:57:17 -0700 Subject: [PATCH] Fixed: don't try to delete series folder if it doesn't exist --- src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs | 5 ++++- src/NzbDrone.Core/Tv/Events/SeriesDeletedEvent.cs | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs b/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs index b3dd60cce..bc12c543f 100644 --- a/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs +++ b/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs @@ -170,7 +170,10 @@ public void HandleAsync(SeriesDeletedEvent message) { if (message.DeleteFiles) { - DeleteFolder(message.Series.Path); + if (_diskProvider.FolderExists(message.Series.Path)) + { + DeleteFolder(message.Series.Path); + } } } diff --git a/src/NzbDrone.Core/Tv/Events/SeriesDeletedEvent.cs b/src/NzbDrone.Core/Tv/Events/SeriesDeletedEvent.cs index e04d8f60e..865edd442 100644 --- a/src/NzbDrone.Core/Tv/Events/SeriesDeletedEvent.cs +++ b/src/NzbDrone.Core/Tv/Events/SeriesDeletedEvent.cs @@ -1,13 +1,14 @@ -using NzbDrone.Common.Messaging; +using System; +using NzbDrone.Common.Messaging; namespace NzbDrone.Core.Tv.Events { public class SeriesDeletedEvent : IEvent { public Series Series { get; private set; } - public bool DeleteFiles { get; private set; } + public Boolean DeleteFiles { get; private set; } - public SeriesDeletedEvent(Series series, bool deleteFiles) + public SeriesDeletedEvent(Series series, Boolean deleteFiles) { Series = series; DeleteFiles = deleteFiles;