summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEran Mizrahi <erasmux@gmail.com>2017-12-18 01:47:03 +0200
committerEran Mizrahi <erasmux@gmail.com>2017-12-18 20:04:45 +0200
commit302a9b744d1f8edbae5cad910b0153f3c717bd2b (patch)
treee512dca6d0afeaa4a0ea9e67b7ae86e839cdba86
parentff31ce636b68a19949d6e4049d20f7cf88e29f99 (diff)
Ensure clearing currentInstance reg key when selecting portable install
-rw-r--r--src/instancemanager.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/instancemanager.cpp b/src/instancemanager.cpp
index 1b0d0e5b..b1b85cc6 100644
--- a/src/instancemanager.cpp
+++ b/src/instancemanager.cpp
@@ -189,6 +189,7 @@ QString InstanceManager::determineDataPath()
if (instanceId.isEmpty() || !QFileInfo::exists(dataPath)) {
instanceId = chooseInstance(instances());
+ setCurrentInstance(instanceId);
if (!instanceId.isEmpty()) {
dataPath = QDir::fromNativeSeparators(
QStandardPaths::writableLocation(QStandardPaths::DataLocation)
@@ -199,8 +200,6 @@ QString InstanceManager::determineDataPath()
if (instanceId.isEmpty()) {
return qApp->applicationDirPath();
} else {
- setCurrentInstance(instanceId);
-
createDataPath(dataPath);
return dataPath;