diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-02 18:24:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 18:24:54 +0200 |
commit | 39d7bc6c24922c2d6e3d6f7eb2ab7efb9b35940a (patch) | |
tree | b933c710d52ecaa8d6fce9f99c91e27419e460db /launcher/Application.cpp | |
parent | bb039d4bc71863bd068efbadb788e76cf1b7bce3 (diff) | |
parent | 6a7f63166d9d65a48b4bc0b0f1355aba047967ee (diff) | |
download | PrismLauncher-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.cpp | 11 |
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"; |