From 8fbc665acb83e47fed1ffd0ae5c9aa1f59fd49bd Mon Sep 17 00:00:00 2001 From: Trial97 Date: Wed, 16 Aug 2023 18:28:46 +0300 Subject: [PATCH] Added UserData as another posible path for portable builds Signed-off-by: Trial97 --- launcher/Application.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/launcher/Application.cpp b/launcher/Application.cpp index a13935101..6237967fb 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -263,7 +263,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;