diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-10-18 13:54:05 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-10-18 13:58:50 +0200 |
commit | 6db3f68ae18098d96ef63cec5ffc666b6150304b (patch) | |
tree | 9f0dea4349a61ca19967a327c4f553bbeca28b70 | |
parent | 3773f2e7a55f7ccfb1d6a9b792e1061cf9a815c1 (diff) | |
download | PrismLauncher-6db3f68ae18098d96ef63cec5ffc666b6150304b.tar.gz PrismLauncher-6db3f68ae18098d96ef63cec5ffc666b6150304b.tar.bz2 PrismLauncher-6db3f68ae18098d96ef63cec5ffc666b6150304b.zip |
refactor: use correct data path
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
-rw-r--r-- | launcher/Application.cpp | 10 |
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 |