From 04aebab774b8055eaf9f525742882477702ab9bc Mon Sep 17 00:00:00 2001 From: Qstick Date: Mon, 7 Sep 2020 01:26:59 -0400 Subject: [PATCH] Fixed: Moving artist folders in subfolders of the root folder when destination subfolder was missing Co-Authored-By: Mark McDowall --- src/NzbDrone.Core/Music/Services/MoveArtistService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/NzbDrone.Core/Music/Services/MoveArtistService.cs b/src/NzbDrone.Core/Music/Services/MoveArtistService.cs index cf3ba7ec8..fc602b78a 100644 --- a/src/NzbDrone.Core/Music/Services/MoveArtistService.cs +++ b/src/NzbDrone.Core/Music/Services/MoveArtistService.cs @@ -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);