Update search-manager.cpp

This commit is contained in:
fensite 2021-05-08 11:02:13 +08:00 committed by GitHub
parent b552c4f7a5
commit e6b3455966
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -422,20 +422,20 @@ void DirectSearch::run() {
while(!bfs.empty()) { while(!bfs.empty()) {
dir.setPath(bfs.dequeue()); dir.setPath(bfs.dequeue());
list = dir.entryInfoList(); list = dir.entryInfoList();
for(auto i : list) { for (auto i : list) {
if(i.isDir() && (!(i.isSymLink()))) { if (i.isDir() && (!(i.isSymLink()))) {
bool findIndex = false; bool findIndex = false;
QStringList blockList = GlobalSettings::getInstance()->getBlockDirs(); QStringList blockList = GlobalSettings::getInstance()->getBlockDirs();
for(QString j : blockList) { for (QString j : blockList) {
if(i.absoluteFilePath().startsWith(j.prepend("/"))){ if (i.absoluteFilePath().startsWith(j.prepend("/"))) {
findIndex = true; findIndex = true;
break; break;
} }
} }
if(findIndex == true){ if (findIndex == true) {
qDebug() << "path is blocked:" << i.absoluteFilePath(); qDebug() << "path is blocked:" << i.absoluteFilePath();
continue; continue;
} }