mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-26 15:52:42 +00:00
Log warnings when deleting a track file and the root folder is missing/empty
This commit is contained in:
parent
45586a5f20
commit
db03f43e30
1 changed files with 2 additions and 0 deletions
|
@ -41,11 +41,13 @@ public void DeleteTrackFile(Artist artist, TrackFile trackFile)
|
|||
|
||||
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…
Reference in a new issue