aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorDioEgizio <83089242+DioEgizio@users.noreply.github.com>2022-10-18 14:05:22 +0200
committerGitHub <noreply@github.com>2022-10-18 14:05:22 +0200
commit2b7b9a2abb512f48399ff91d854eb68fccdc6f37 (patch)
tree9f0dea4349a61ca19967a327c4f553bbeca28b70 /launcher
parent3773f2e7a55f7ccfb1d6a9b792e1061cf9a815c1 (diff)
parent6db3f68ae18098d96ef63cec5ffc666b6150304b (diff)
downloadPrismLauncher-2b7b9a2abb512f48399ff91d854eb68fccdc6f37.tar.gz
PrismLauncher-2b7b9a2abb512f48399ff91d854eb68fccdc6f37.tar.bz2
PrismLauncher-2b7b9a2abb512f48399ff91d854eb68fccdc6f37.zip
Merge pull request #25 from PlaceholderMC/fix-data-path
Fix Data path
Diffstat (limited to 'launcher')
-rw-r--r--launcher/Application.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 24273014..e94e96a9 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -224,9 +224,9 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
consoleAttached = true;
}
#endif
- setOrganizationName(BuildConfig.LAUNCHER_DISPLAYNAME);
+ setOrganizationName(BuildConfig.LAUNCHER_NAME);
setOrganizationDomain(BuildConfig.LAUNCHER_DOMAIN);
- setApplicationName(BuildConfig.LAUNCHER_DISPLAYNAME);
+ setApplicationName(BuildConfig.LAUNCHER_NAME);
setApplicationDisplayName(QString("%1 %2").arg(BuildConfig.LAUNCHER_DISPLAYNAME, BuildConfig.printableVersionString()));
setApplicationVersion(BuildConfig.printableVersionString());
setDesktopFileName(BuildConfig.LAUNCHER_DESKTOPFILENAME);
@@ -301,6 +301,12 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
dataPath = foo.absolutePath();
adjustedBy = "Persistent data path";
+ QDir polymcData(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation), "PolyMC"));
+ if (polymcData.exists()) {
+ dataPath = polymcData.absolutePath();
+ adjustedBy = "PolyMC data path";
+ }
+
#ifdef Q_OS_LINUX
// TODO: this should be removed in a future version
// TODO: provide a migration path similar to macOS migration