Skip to content

Commit

Permalink
feat: Unable to set timer reminder in Linglong environment
Browse files Browse the repository at this point in the history
玲珑环境会将家目录config进行隔离, 无法在此创建systemd服务
检测玲珑环境并修正config路径位置

Log:
  • Loading branch information
myml committed Aug 8, 2024
1 parent c009ff2 commit 11ad247
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion calendar-service/src/csystemdtimercontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,13 @@ void CSystemdTimerControl::stopUploadTask()
void CSystemdTimerControl::createPath()
{
m_systemdPath = getHomeConfigPath().append("/systemd/user/");
// 如果位于玲珑环境, 更改systemd path路径
QString linglongAppID = qgetenv("LINGLONG_APPID");
if (!linglongAppID.isEmpty()) {
m_systemdPath = "/run/host/rootfs" + m_systemdPath;
}
QDir dir;
//如果该路径不存在,则创建该文件夹
// 如果该路径不存在,则创建该文件夹
if (!dir.exists(m_systemdPath)) {
dir.mkpath(m_systemdPath);
}
Expand Down

0 comments on commit 11ad247

Please sign in to comment.