Skip to content

Commit

Permalink
Fixed: Skip move when source and destination are the same
Browse files Browse the repository at this point in the history
Co-authored-by: Qstick <qstick@gmail.com>
  • Loading branch information
mynameisbogdan and Qstick committed Apr 20, 2024
1 parent 7656142 commit ba1195f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/NzbDrone.Core/Books/Services/MoveAuthorService.cs
@@ -1,6 +1,7 @@
using System.IO;
using NLog;
using NzbDrone.Common.Disk;
using NzbDrone.Common.Extensions;
using NzbDrone.Common.Instrumentation.Extensions;
using NzbDrone.Core.Books.Commands;
using NzbDrone.Core.Books.Events;
Expand Down Expand Up @@ -55,6 +56,12 @@ private void MoveSingleAuthor(Author author, string sourcePath, string destinati
_logger.ProgressInfo("Moving {0} from '{1}' to '{2}'", author.Name, sourcePath, destinationPath);
}

if (sourcePath.PathEquals(destinationPath))
{
_logger.ProgressInfo("{0} is already in the specified location '{1}'.", author, destinationPath);
return;
}

try
{
_rootFolderWatchingService.ReportFileSystemChangeBeginning(sourcePath, destinationPath);
Expand Down

0 comments on commit ba1195f

Please sign in to comment.