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()) {
dir.setPath(bfs.dequeue());
list = dir.entryInfoList();
for(auto i : list) {
if(i.isDir() && (!(i.isSymLink()))) {
for (auto i : list) {
if (i.isDir() && (!(i.isSymLink()))) {
bool findIndex = false;
QStringList blockList = GlobalSettings::getInstance()->getBlockDirs();
for(QString j : blockList) {
if(i.absoluteFilePath().startsWith(j.prepend("/"))){
for (QString j : blockList) {
if (i.absoluteFilePath().startsWith(j.prepend("/"))) {
findIndex = true;
break;
}
}
if(findIndex == true){
if (findIndex == true) {
qDebug() << "path is blocked:" << i.absoluteFilePath();
continue;
}