Fix: Black list wont't work when block home location.
This commit is contained in:
parent
dc6c7625f6
commit
9998b87f29
|
@ -414,6 +414,10 @@ DirectSearch::DirectSearch(QString keyword, QQueue<QString> *searchResultFile, Q
|
|||
}
|
||||
|
||||
void DirectSearch::run() {
|
||||
QStringList blockList = GlobalSettings::getInstance()->getBlockDirs();
|
||||
if(blockList.contains(QStandardPaths::writableLocation(QStandardPaths::HomeLocation).remove(0,1), Qt::CaseSensitive)) {
|
||||
return;
|
||||
}
|
||||
QQueue<QString> 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();
|
||||
|
|
Loading…
Reference in New Issue