Log warnings when deleting a track file and the root folder is missing/empty

pull/6/head
Qstick 7 years ago
parent 45586a5f20
commit db03f43e30

@ -41,11 +41,13 @@ namespace NzbDrone.Core.MediaFiles
if (!_diskProvider.FolderExists(rootFolder))
{
_logger.Warn("Artist's root folder ({0}) doesn't exist.", rootFolder);
throw new NzbDroneClientException(HttpStatusCode.Conflict, "Artist's root folder ({0}) doesn't exist.", rootFolder);
}
if (_diskProvider.GetDirectories(rootFolder).Empty())
{
_logger.Warn("Artist's root folder ({0}) is empty.", rootFolder);
throw new NzbDroneClientException(HttpStatusCode.Conflict, "Artist's root folder ({0}) is empty.", rootFolder);
}

Loading…
Cancel
Save