Merge pull request #1529 from Trial97/portabledatadir

Added UserData as another posible path for portable builds
This commit is contained in:
Alexandru Ionut Tripon 2024-03-28 14:48:34 +02:00 committed by GitHub
commit b3abc052b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -308,7 +308,11 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
adjustedBy = "Persistent data path";
#ifndef Q_OS_MACOS
if (QFile::exists(FS::PathCombine(m_rootPath, "portable.txt"))) {
if (auto portableUserData = FS::PathCombine(m_rootPath, "UserData"); QDir(portableUserData).exists()) {
dataPath = portableUserData;
adjustedBy = "Portable user data path";
m_portable = true;
} else if (QFile::exists(FS::PathCombine(m_rootPath, "portable.txt"))) {
dataPath = m_rootPath;
adjustedBy = "Portable data path";
m_portable = true;