aboutsummaryrefslogtreecommitdiff
path: root/launcher/Application.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-08-02 18:24:54 +0200
committerGitHub <noreply@github.com>2023-08-02 18:24:54 +0200
commit39d7bc6c24922c2d6e3d6f7eb2ab7efb9b35940a (patch)
treeb933c710d52ecaa8d6fce9f99c91e27419e460db /launcher/Application.cpp
parentbb039d4bc71863bd068efbadb788e76cf1b7bce3 (diff)
parent6a7f63166d9d65a48b4bc0b0f1355aba047967ee (diff)
downloadPrismLauncher-39d7bc6c24922c2d6e3d6f7eb2ab7efb9b35940a.tar.gz
PrismLauncher-39d7bc6c24922c2d6e3d6f7eb2ab7efb9b35940a.tar.bz2
PrismLauncher-39d7bc6c24922c2d6e3d6f7eb2ab7efb9b35940a.zip
Merge pull request #1294 from ashuntu/develop
Diffstat (limited to 'launcher/Application.cpp')
-rw-r--r--launcher/Application.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index aeea90f1..fd253dab 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -281,7 +281,16 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
}
else
{
- QDir foo(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), ".."));
+ QDir foo;
+ if (DesktopServices::isSnap())
+ {
+ foo = QDir(getenv("SNAP_USER_COMMON"));
+ }
+ else
+ {
+ foo = QDir(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), ".."));
+ }
+
dataPath = foo.absolutePath();
adjustedBy = "Persistent data path";