mirror of
https://github.com/Sonarr/Sonarr
synced 2025-02-21 13:47:10 +00:00
Log warnings when deleting an episode file and the root folder is missing/empty
Closes #2305
This commit is contained in:
parent
ae2a97763d
commit
b45b2017a8
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using NLog;
|
using NLog;
|
||||||
|
@ -41,11 +41,13 @@ namespace NzbDrone.Core.MediaFiles
|
||||||
|
|
||||||
if (!_diskProvider.FolderExists(rootFolder))
|
if (!_diskProvider.FolderExists(rootFolder))
|
||||||
{
|
{
|
||||||
|
_logger.Warn("Series' root folder ({0}) doesn't exist.", rootFolder);
|
||||||
throw new NzbDroneClientException(HttpStatusCode.Conflict, "Series' root folder ({0}) doesn't exist.", rootFolder);
|
throw new NzbDroneClientException(HttpStatusCode.Conflict, "Series' root folder ({0}) doesn't exist.", rootFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_diskProvider.GetDirectories(rootFolder).Empty())
|
if (_diskProvider.GetDirectories(rootFolder).Empty())
|
||||||
{
|
{
|
||||||
|
_logger.Warn("Series' root folder ({0}) is empty.", rootFolder);
|
||||||
throw new NzbDroneClientException(HttpStatusCode.Conflict, "Series' root folder ({0}) is empty.", rootFolder);
|
throw new NzbDroneClientException(HttpStatusCode.Conflict, "Series' root folder ({0}) is empty.", rootFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue