From 6f21f3a19fbd82bc43c97dcab877959220ce2f22 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Thu, 30 Jul 2020 01:17:30 -0400 Subject: disable portable instance button if one exists --- src/instancemanager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/instancemanager.cpp') diff --git a/src/instancemanager.cpp b/src/instancemanager.cpp index 2c8d8fb3..b6798fa9 100644 --- a/src/instancemanager.cpp +++ b/src/instancemanager.cpp @@ -344,7 +344,7 @@ QString InstanceManager::portablePath() return qApp->applicationDirPath(); } -bool InstanceManager::portableInstall() const +bool InstanceManager::portableInstanceExists() const { return QFile::exists(qApp->applicationDirPath() + "/" + QString::fromStdWString(AppConfig::iniFileName())); @@ -357,7 +357,6 @@ bool InstanceManager::portableInstallIsLocked() const QString::fromStdWString(AppConfig::portableLockFileName())); } - bool InstanceManager::allowedToChangeInstance() const { return !portableInstallIsLocked(); @@ -388,7 +387,7 @@ QString InstanceManager::determineDataPath() { instanceId.clear(); } - if (instanceId.isEmpty() && !m_Reset && (m_overrideInstance || portableInstall())) + if (instanceId.isEmpty() && !m_Reset && (m_overrideInstance || portableInstanceExists())) { // startup, apparently using portable mode before return qApp->applicationDirPath(); -- cgit v1.3.1