Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 3212e4a

Browse files
committed
Move app data to Application Support
1 parent fb37ff9 commit 3212e4a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

launcher/Application.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
309309
else
310310
{
311311
#if defined(Q_OS_MAC)
312-
QDir foo(FS::PathCombine(applicationDirPath(), "../../Data"));
312+
QDir foo(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), ".."));
313313
dataPath = foo.absolutePath();
314314
adjustedBy += "Fallback to special Mac location " + dataPath;
315315
#else
@@ -518,10 +518,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
518518
#elif defined(Q_OS_WIN32)
519519
m_rootPath = binPath;
520520
#elif defined(Q_OS_MAC)
521-
QDir foo(FS::PathCombine(binPath, "../.."));
521+
QDir foo(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation), ".."));
522522
m_rootPath = foo.absolutePath();
523-
// on macOS, touch the root to force Finder to reload the .app metadata (and fix any icon change issues)
524-
FS::updateTimestamp(m_rootPath);
525523
#endif
526524

527525
qDebug() << BuildConfig.LAUNCHER_DISPLAYNAME << ", (c) 2013-2021 " << BuildConfig.LAUNCHER_COPYRIGHT;

0 commit comments

Comments
 (0)