Skip to content

Commit

Permalink
fix: fix the issue of incomplete search results
Browse files Browse the repository at this point in the history
dmanHelper uses the directories in XDG_DATA_DIRS to create a search
database. Before the fix, dmanHelper found very few application help.
In order to search for help information for host applications and
linglong applications, let's add the relevant paths.

Log: Adapt linglong
Bug: https://pms.uniontech.com/bug-view-290335.html
  • Loading branch information
wangrong1069 authored and deepin-bot[bot] committed Dec 23, 2024
1 parent 67afd61 commit 504d895
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/dman_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ int main(int argc, char **argv)
}
#endif

// 增加路径以搜索主机应用和玲珑应用中的帮助手册
if (qEnvironmentVariableIsSet("LINGLONG_APPID")) {
QByteArray paths = qgetenv("XDG_DATA_DIRS");
paths.append(":/run/host/rootfs/usr/share:/run/host/rootfs/var/lib/linglong/entries/share");
qputenv("XDG_DATA_DIRS", paths);
}

// 后端服务dmanHelper自检,若前端dman应用不存在,则后端dmanHelper退出
DManWatcher watcher;
ManualSearchProxy search_obj;
Expand Down

0 comments on commit 504d895

Please sign in to comment.