Merge branch '0811-dev' into 'dev-unity'
Fix: Black list wont't work when block home location. See merge request kylin-desktop/ukui-search!139
This commit is contained in:
commit
dc5cfce2f6
|
@ -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