Fixed: Moving artist folders in subfolders of the root folder when destination subfolder was missing

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick 2020-09-07 01:26:59 -04:00
commit 04aebab774

View file

@ -61,6 +61,9 @@ namespace NzbDrone.Core.Music
{
_rootFolderWatchingService.ReportFileSystemChangeBeginning(sourcePath, destinationPath);
// Ensure the parent of the artist folder exists, this will often just be the root folder, but
// in cases where people are using subfolders for first letter (etc) it may not yet exist.
_diskProvider.CreateFolder(new DirectoryInfo(destinationPath).Parent.FullName);
_diskTransferService.TransferFolder(sourcePath, destinationPath, TransferMode.Move);
_logger.ProgressInfo("{0} moved successfully to {1}", artist.Name, artist.Path);