Merge pull request #1529 from Trial97/portabledatadir
Added UserData as another posible path for portable builds
This commit is contained in:
commit
b3abc052b5
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue