diff --git a/libsearch/index/search-manager.cpp b/libsearch/index/search-manager.cpp index 7ca066d..5d04f8f 100644 --- a/libsearch/index/search-manager.cpp +++ b/libsearch/index/search-manager.cpp @@ -414,6 +414,10 @@ DirectSearch::DirectSearch(QString keyword, QQueue *searchResultFile, Q } void DirectSearch::run() { + QStringList blockList = GlobalSettings::getInstance()->getBlockDirs(); + if(blockList.contains(QStandardPaths::writableLocation(QStandardPaths::HomeLocation).remove(0,1), Qt::CaseSensitive)) { + return; + } QQueue bfs; bfs.enqueue(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); QFileInfoList list; @@ -421,7 +425,7 @@ void DirectSearch::run() { // QDir::Hidden dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot); dir.setSorting(QDir::DirsFirst); - QStringList blockList = GlobalSettings::getInstance()->getBlockDirs(); + while(!bfs.empty()) { dir.setPath(bfs.dequeue()); list = dir.entryInfoList();