diff --git a/TVRename/TVRename/TVDoc.cs b/TVRename/TVRename/TVDoc.cs index 9c98ec63b..476d532e1 100644 --- a/TVRename/TVRename/TVDoc.cs +++ b/TVRename/TVRename/TVDoc.cs @@ -1101,8 +1101,16 @@ private void ReviewFileInDownloadDirectory(bool unattended, DirFilesCache dfc, L //File is needed as there are no files for that series/episode fileCanBeDeleted = false; } - else foreach (FileInfo existingFile in encumbants) + else { + foreach (FileInfo existingFile in encumbants) { + if (existingFile.FullName == fi.FullName) + { + //the user has put the search folder and the download folder in the same place - DO NOT DELETE + fileCanBeDeleted = false; + continue; + } + FileHelper.VideoComparison result = FileHelper.BetterQualityFile(existingFile, fi); switch (result) { @@ -1182,6 +1190,7 @@ private void ReviewFileInDownloadDirectory(bool unattended, DirFilesCache dfc, L throw new ArgumentOutOfRangeException(); } } + } } catch (SeriesInfo.EpisodeNotFoundException _) {