aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor <virb3e@gmail.com>2021-12-30 22:08:15 +0200
committerdada513 <dada513@protonmail.com>2022-02-09 12:23:18 +0100
commitd2f86cbf32aa4a41b920b70254ca3ae0380a5065 (patch)
tree5156c937db04945463a707c02bf6d73ccdc640e4
parent00e12b776bbdc3db5bc8456b046117218ad12b83 (diff)
downloadPrismLauncher-d2f86cbf32aa4a41b920b70254ca3ae0380a5065.tar.gz
PrismLauncher-d2f86cbf32aa4a41b920b70254ca3ae0380a5065.tar.bz2
PrismLauncher-d2f86cbf32aa4a41b920b70254ca3ae0380a5065.zip
Move app data to Application Support
-rw-r--r--launcher/Application.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 7050e5dc..6abe1838 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -311,7 +311,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
dataPath = xdgDataHome + "/polymc";
adjustedBy += "XDG standard " + dataPath;
#elif defined(Q_OS_MAC)
- QDir foo(FS::PathCombine(applicationDirPath(), "../../Data"));
+ QDir foo(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), ".."));
dataPath = foo.absolutePath();
adjustedBy += "Fallback to special Mac location " + dataPath;
#else
@@ -529,10 +529,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
#elif defined(Q_OS_WIN32)
m_rootPath = binPath;
#elif defined(Q_OS_MAC)
- QDir foo(FS::PathCombine(binPath, "../.."));
+ QDir foo(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), ".."));
m_rootPath = foo.absolutePath();
- // on macOS, touch the root to force Finder to reload the .app metadata (and fix any icon change issues)
- FS::updateTimestamp(m_rootPath);
#endif
#ifdef MULTIMC_JARS_LOCATION