aboutsummaryrefslogtreecommitdiff
path: root/launcher/Application.cpp
diff options
context:
space:
mode:
authorLennyMcLennington <lenny@sneed.church>2022-02-11 13:52:56 +0000
committerGitHub <noreply@github.com>2022-02-11 13:52:56 +0000
commitbcfa3246cbacb54c522275dd442429178ee363b1 (patch)
tree0f8363197690f27e9664f64a6ab3086b6dde483b /launcher/Application.cpp
parent11f892380e74d22b22a03c3a0901c2fea815d76f (diff)
parentca9929214daa0cdb41d137fe69c4f9d56e3d829f (diff)
downloadPrismLauncher-bcfa3246cbacb54c522275dd442429178ee363b1.tar.gz
PrismLauncher-bcfa3246cbacb54c522275dd442429178ee363b1.tar.bz2
PrismLauncher-bcfa3246cbacb54c522275dd442429178ee363b1.zip
Merge pull request #146 from dada513/macos_application_support
[MACOS] Move app data to Application Support
Diffstat (limited to 'launcher/Application.cpp')
-rw-r--r--launcher/Application.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 3a888739..93cefc28 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -313,7 +313,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
@@ -531,10 +531,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