aboutsummaryrefslogtreecommitdiff
path: root/launcher/Application.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-02-14 20:20:11 +0100
committertxtsd <thexerothermicsclerodermoid@gmail.com>2022-02-23 16:22:53 +0530
commitca8b62291fe47554effaf625b5c52807802a58a9 (patch)
tree7e38ffde70f30ba9a14ed0ba4f625f6fed0fb74a /launcher/Application.cpp
parent69d01204e0e1220e196d4a7cb6cfdb41292bc6a9 (diff)
downloadPrismLauncher-ca8b62291fe47554effaf625b5c52807802a58a9.tar.gz
PrismLauncher-ca8b62291fe47554effaf625b5c52807802a58a9.tar.bz2
PrismLauncher-ca8b62291fe47554effaf625b5c52807802a58a9.zip
fix: use legacy data path if it exists
Diffstat (limited to 'launcher/Application.cpp')
-rw-r--r--launcher/Application.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index fa5d267e..bf644ea6 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -298,6 +298,16 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
QDir foo(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), ".."));
dataPath = foo.absolutePath();
adjustedBy += dataPath;
+
+#ifdef Q_OS_LINUX
+ // TODO: this should be removed in a future version
+ // TODO: provide a migration path similar to macOS migration
+ QDir bar(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation), "polymc"));
+ if (bar.exists()) {
+ dataPath = bar.absolutePath();
+ adjustedBy += "Legacy data path " + dataPath;
+ }
+#endif
#else
dataPath = applicationDirPath();
adjustedBy += "Fallback to binary path " + dataPath;