mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-22 09:29:59 +00:00
Fixed: Skip move when source and destination are the same
Co-authored-by: Qstick <qstick@gmail.com>
This commit is contained in:
@@ -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;
|
||||
@@ -55,6 +56,12 @@ namespace NzbDrone.Core.Books
|
||||
_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);
|
||||
|
||||
Reference in New Issue
Block a user