mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 14:17:45 +00:00
Fallback to launcher basename if FLATPAK_ID variable is empty
This commit is contained in:
@@ -280,8 +280,16 @@ QString AppRuntimeDirectory() {
|
|||||||
QStandardPaths::RuntimeLocation);
|
QStandardPaths::RuntimeLocation);
|
||||||
|
|
||||||
if (InSandbox()) {
|
if (InSandbox()) {
|
||||||
|
const auto flatpakId = [&] {
|
||||||
|
if (!qEnvironmentVariableIsEmpty("FLATPAK_ID")) {
|
||||||
|
return QString::fromLatin1(qgetenv("FLATPAK_ID"));
|
||||||
|
} else {
|
||||||
|
return GetLauncherBasename();
|
||||||
|
}
|
||||||
|
}();
|
||||||
|
|
||||||
runtimeDir += qsl("/app/")
|
runtimeDir += qsl("/app/")
|
||||||
+ QString::fromLatin1(qgetenv("FLATPAK_ID"));
|
+ flatpakId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!QFileInfo::exists(runtimeDir)) { // non-systemd distros
|
if (!QFileInfo::exists(runtimeDir)) { // non-systemd distros
|
||||||
|
Reference in New Issue
Block a user