Fix blockpath uneffective problem
This commit is contained in:
parent
035c68cc45
commit
b552c4f7a5
|
@ -424,6 +424,22 @@ void DirectSearch::run() {
|
||||||
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;
|
||||||
|
|
||||||
|
QStringList blockList = GlobalSettings::getInstance()->getBlockDirs();
|
||||||
|
for(QString j : blockList) {
|
||||||
|
if(i.absoluteFilePath().startsWith(j.prepend("/"))){
|
||||||
|
findIndex = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(findIndex == true){
|
||||||
|
qDebug() << "path is blocked:" << i.absoluteFilePath();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
bfs.enqueue(i.absoluteFilePath());
|
bfs.enqueue(i.absoluteFilePath());
|
||||||
}
|
}
|
||||||
if(i.fileName().contains(m_keyword, Qt::CaseInsensitive)) {
|
if(i.fileName().contains(m_keyword, Qt::CaseInsensitive)) {
|
||||||
|
|
Loading…
Reference in New Issue