fix: take GIO env back

Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
ComixHe 2024-04-03 13:22:07 +08:00 committed by Comix
parent 144461c379
commit d541c433bb

View File

@ -40,8 +40,13 @@ void ApplicationService::appendExtraEnvironments(QVariantMap &runtimeOptions) co
}
const QString &env = environ();
if (!env.isEmpty())
if (!env.isEmpty()) {
//NOTE: prepend this directly may lead some error
oldEnv.prepend(env);
}
// NOTE: dde-dock need this environment variable for now, maybe we could remove it after we finish refactoring dde-shell.
oldEnv.append(QString{"GIO_LAUNCHED_DESKTOP_FILE=%1;"}.arg(m_desktopSource.sourcePath()));
runtimeOptions.insert("env", oldEnv);
}