aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--launcher/Application.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 1d97a5f2..b91b3157 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -280,7 +280,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";