From cc5d6e8215665bf0c940513ac37e66122d0b7fa0 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 20 Nov 2018 07:33:22 +0800 Subject: [PATCH] Fix for https://groups.google.com/forum/#!topic/tvrename/jm24J1vwt7Q --- TVRename/TVRename/TVDoc.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 _) {