Fixed: Don't create empty series folder if delete empty folders is enabled

Fixes #3838
This commit is contained in:
Mark McDowall 2020-07-26 10:50:11 -07:00
parent dffdd3377e
commit 4f15cd55be
1 changed files with 11 additions and 3 deletions

View File

@ -94,9 +94,17 @@ namespace NzbDrone.Core.MediaFiles
{ {
if (_configService.CreateEmptySeriesFolders) if (_configService.CreateEmptySeriesFolders)
{ {
_logger.Debug("Creating missing series folder: {0}", series.Path); if (_configService.DeleteEmptyFolders)
_diskProvider.CreateFolder(series.Path); {
SetPermissions(series.Path); _logger.Debug("Not creating missing series folder: {0} because delete empty series folders is enabled", series.Path);
}
else
{
_logger.Debug("Creating missing series folder: {0}", series.Path);
_diskProvider.CreateFolder(series.Path);
SetPermissions(series.Path);
}
} }
else else
{ {