Add the dir path check of searchable dir for direct search.

This commit is contained in:
JunjieBai 2022-10-20 10:36:19 +08:00
parent f1a9a65f92
commit bd0acd9523
1 changed files with 6 additions and 1 deletions

View File

@ -439,7 +439,12 @@ void DirWatcher::initData()
<< "/sys" << "/proc" << "/srv" << "/sbin" << "/run" << "/opt";
//目前方案:可搜索目录(服务)默认根目录,可搜索目录(应用)默认家目录和/data目录
m_searchableListForApplication << "/data" << QDir::homePath();
QDir dir("/data");
if (dir.exists()) {
m_searchableListForApplication << "/data";
}
m_searchableListForApplication << QDir::homePath();
m_searchableDirList << "/";
//init auto mounted device list