fix(file-search-plugin):修复文件搜索插件中死循环的问题

This commit is contained in:
iaom 2023-10-16 13:31:41 +08:00 committed by Baijunjie
parent 7142e105e5
commit 26d363ab3f
1 changed files with 4 additions and 4 deletions

View File

@ -150,14 +150,14 @@ uint FileSearch::keywordSearchFile() {
if(resultCount == 0)
return 0;
if(getResult(result) == -1)
return -1;
return 0;
qDebug() << "--keywordSearchFile finish--";
return resultCount;
} catch(const Xapian::Error &e) {
qWarning() << QString::fromStdString(e.get_description());
qDebug() << "--keywordSearchFile finish--";
return -1;
return 0;
}
}
@ -311,7 +311,7 @@ uint FileContentSearch::keywordSearchContent() {
qDebug() << "keywordSearchContent results count=" << resultCount;
if(getResult(result, words) == -1) {
return -1;
return 0;
}
qDebug() << "--keywordSearchContent search finish--";
@ -319,7 +319,7 @@ uint FileContentSearch::keywordSearchContent() {
} catch(const Xapian::Error &e) {
qWarning() << QString::fromStdString(e.get_description());
qDebug() << "--keywordSearchContent search finish--";
return -1;
return 0;
}
}