diff --git a/daemon/postprocess/ParChecker.cpp b/daemon/postprocess/ParChecker.cpp index ca188db1..6165c3b0 100644 --- a/daemon/postprocess/ParChecker.cpp +++ b/daemon/postprocess/ParChecker.cpp @@ -1126,8 +1126,7 @@ void ParChecker::signal_done(std::string str, int available, int total) } } - bool ignore = Util::MatchFileExt(filename, g_Options->GetParIgnoreExt(), ",;") || - Util::MatchFileExt(filename, g_Options->GetExtCleanupDisk(), ",;"); + bool ignore = Util::MatchFileExt(filename, g_Options->GetParIgnoreExt(), ",;"); m_hasDamagedFiles |= !ignore; if (fileExists) @@ -1168,8 +1167,7 @@ void ParChecker::CheckEmptyFiles() const char* filename = filenameObj.c_str(); if (!Util::EmptyStr(filename) && !IsProcessedFile(filename)) { - bool ignore = Util::MatchFileExt(filename, g_Options->GetParIgnoreExt(), ",;") || - Util::MatchFileExt(filename, g_Options->GetExtCleanupDisk(), ",;"); + bool ignore = Util::MatchFileExt(filename, g_Options->GetParIgnoreExt(), ",;"); m_hasDamagedFiles |= !ignore; int total = sourcefile->GetVerificationPacket() ? sourcefile->GetVerificationPacket()->BlockCount() : 0; diff --git a/daemon/postprocess/ParRenamer.cpp b/daemon/postprocess/ParRenamer.cpp index 26088448..2353f42b 100644 --- a/daemon/postprocess/ParRenamer.cpp +++ b/daemon/postprocess/ParRenamer.cpp @@ -222,8 +222,7 @@ void ParRenamer::CheckMissing() FileHash& fileHash = *it; if (!fileHash.GetFileExists()) { - if (Util::MatchFileExt(fileHash.GetFilename(), g_Options->GetParIgnoreExt(), ",;") || - Util::MatchFileExt(fileHash.GetFilename(), g_Options->GetExtCleanupDisk(), ",;")) + if (Util::MatchFileExt(fileHash.GetFilename(), g_Options->GetParIgnoreExt(), ",;")) { PrintMessage(Message::mkInfo, "File %s is missing, ignoring", fileHash.GetFilename()); } diff --git a/daemon/queue/NzbFile.cpp b/daemon/queue/NzbFile.cpp index 7d493c4c..2876c25c 100644 --- a/daemon/queue/NzbFile.cpp +++ b/daemon/queue/NzbFile.cpp @@ -346,7 +346,7 @@ void NzbFile::CalcHashes() // check file extension bool skip = !fileInfo->GetParFile() && - Util::MatchFileExt(fileInfo->GetFilename(), g_Options->GetExtCleanupDisk(), ",;"); + Util::MatchFileExt(fileInfo->GetFilename(), g_Options->GetParIgnoreExt(), ",;"); for (FileInfo::Articles::iterator it = fileInfo->GetArticles()->begin(); it != fileInfo->GetArticles()->end(); it++) { diff --git a/nzbget.conf b/nzbget.conf index bc78f35a..36449f34 100644 --- a/nzbget.conf +++ b/nzbget.conf @@ -1274,8 +1274,6 @@ ParThreads=0 # will ignore files matching this option and will not initiate # repair. This avoids time costing repair for unimportant files. # -# NOTE: Files matching the option are ignored as well. -# # Example: .sfv, .nzb, .nfo ParIgnoreExt=.sfv, .nzb, .nfo @@ -1415,10 +1413,6 @@ SevenZipCmd=7z # extensions, file names or file masks containing wildcard # characters * and ?. # -# Files listed here are also ignored by par-rename and par-check. -# -# NOTE: See also option . -# # Example: .par2, .sfv ExtCleanupDisk=.par2, .sfv, _brokenlog.txt diff --git a/tests/postprocess/ParCheckerTest.cpp b/tests/postprocess/ParCheckerTest.cpp index f07e74a9..4398b88f 100644 --- a/tests/postprocess/ParCheckerTest.cpp +++ b/tests/postprocess/ParCheckerTest.cpp @@ -235,14 +235,18 @@ TEST_CASE("Par-checker: ignoring extensions", "[Par][ParChecker][Slow][TestData] cmdOpts.push_back("ParRepair=yes"); cmdOpts.push_back("BrokenLog=no"); + ParChecker::EStatus expectedStatus; + SECTION("ParIgnoreExt") { cmdOpts.push_back("ParIgnoreExt=.dat"); + expectedStatus = ParChecker::psRepairNotNeeded; } SECTION("ExtCleanupDisk") { cmdOpts.push_back("ExtCleanupDisk=.dat"); + expectedStatus = ParChecker::psFailed; } Options options(&cmdOpts, nullptr); @@ -258,5 +262,5 @@ TEST_CASE("Par-checker: ignoring extensions", "[Par][ParChecker][Slow][TestData] parChecker.Execute(); - REQUIRE(parChecker.GetStatus() == ParChecker::psRepairNotNeeded); + REQUIRE(parChecker.GetStatus() == expectedStatus); }