mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Fallback to launcher basename if FLATPAK_ID variable is empty
This commit is contained in:
parent
da926d7f10
commit
d47e94ea4d
1 changed files with 9 additions and 1 deletions
|
@ -280,8 +280,16 @@ QString AppRuntimeDirectory() {
|
|||
QStandardPaths::RuntimeLocation);
|
||||
|
||||
if (InSandbox()) {
|
||||
const auto flatpakId = [&] {
|
||||
if (!qEnvironmentVariableIsEmpty("FLATPAK_ID")) {
|
||||
return QString::fromLatin1(qgetenv("FLATPAK_ID"));
|
||||
} else {
|
||||
return GetLauncherBasename();
|
||||
}
|
||||
}();
|
||||
|
||||
runtimeDir += qsl("/app/")
|
||||
+ QString::fromLatin1(qgetenv("FLATPAK_ID"));
|
||||
+ flatpakId;
|
||||
}
|
||||
|
||||
if (!QFileInfo::exists(runtimeDir)) { // non-systemd distros
|
||||
|
|
Loading…
Add table
Reference in a new issue