From 6cd7a92576f0a6b3e732342a0d2433cb90f5715e Mon Sep 17 00:00:00 2001 From: Albert S Date: Mon, 1 May 2023 23:51:00 +0200 Subject: [PATCH] shared: Indexer: Fix case where errors did not increase counter --- shared/indexer.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/shared/indexer.cpp b/shared/indexer.cpp index e92ce4b..2287d7f 100644 --- a/shared/indexer.cpp +++ b/shared/indexer.cpp @@ -111,6 +111,20 @@ void Indexer::dirScanProgress(int current, int total) void Indexer::processFileScanResult(FileScanResult result) { + /* TODO: OK_WASEMPTY might need a special list */ + if(result.second == OK || result.second == OK_WASEMPTY) + { + ++this->currentIndexResult.addedPaths; + } + else if(result.second == SKIPPED) + { + ++this->currentIndexResult.skippedPaths; + } + else + { + ++this->currentIndexResult.erroredPaths; + } + if(isErrorSaveFileResult(result.second)) { this->currentIndexResult.results.append(result); @@ -129,20 +143,6 @@ void Indexer::processFileScanResult(FileScanResult result) } } - /* TODO: OK_WASEMPTY might need a special list */ - if(result.second == OK || result.second == OK_WASEMPTY) - { - ++this->currentIndexResult.addedPaths; - } - else if(result.second == SKIPPED) - { - ++this->currentIndexResult.skippedPaths; - } - else - { - ++this->currentIndexResult.erroredPaths; - } - QTime currentTime = QTime::currentTime(); if(currentScanProcessedCount++ == progressReportThreshold || this->lastProgressReportTime.secsTo(currentTime) >= 10) {