From 7a5ae56a96700f401726ac80b3031a25207d8f75 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 9 Jul 2023 23:08:05 -0500 Subject: [PATCH] Fixed: Skip move when source and destination are the same Co-Authored-By: Colin Hebert --- src/NzbDrone.Core/Movies/MoveMovieService.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/NzbDrone.Core/Movies/MoveMovieService.cs b/src/NzbDrone.Core/Movies/MoveMovieService.cs index 2c99109112..e9f58538a9 100644 --- a/src/NzbDrone.Core/Movies/MoveMovieService.cs +++ b/src/NzbDrone.Core/Movies/MoveMovieService.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.Messaging.Commands; using NzbDrone.Core.Messaging.Events; @@ -51,6 +52,12 @@ private void MoveSingleMovie(Movie movie, string sourcePath, string destinationP _logger.ProgressInfo("Moving {0} from '{1}' to '{2}'", movie.Title, sourcePath, destinationPath); } + if (sourcePath.PathEquals(destinationPath)) + { + _logger.ProgressInfo("{0} is already in the specified location '{1}'.", movie, destinationPath); + return; + } + try { _diskProvider.CreateFolder(new DirectoryInfo(destinationPath).Parent.FullName);