aboutsummaryrefslogtreecommitdiff
path: root/launcher/Application.cpp
diff options
context:
space:
mode:
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";