shared: Indexer: Fix case where errors did not increase counter

This commit is contained in:
Albert S. 2023-05-01 23:51:00 +02:00
parent 9540f27c95
commit 6cd7a92576
1 changed files with 14 additions and 14 deletions

View File

@ -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)
{