mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
portable setup is no longer offered if the directory isn't writable
This commit is contained in:
+12
-9
@@ -172,18 +172,21 @@ QString InstanceManager::determineDataPath()
|
||||
|
||||
QStringList instanceList = instances();
|
||||
|
||||
qDebug("%d - %s", instanceList.size(), qPrintable(instanceList.join(";")));
|
||||
|
||||
if (instanceList.size() == 0) {
|
||||
switch (queryInstallMode()) {
|
||||
case InstallationMode::PORTABLE: {
|
||||
instanceId = QString();
|
||||
} break;
|
||||
case InstallationMode::REGULAR: {
|
||||
instanceId = queryInstanceName();
|
||||
} break;
|
||||
if (QFileInfo(qApp->applicationDirPath()).isWritable()) {
|
||||
switch (queryInstallMode()) {
|
||||
case InstallationMode::PORTABLE: {
|
||||
instanceId = QString();
|
||||
} break;
|
||||
case InstallationMode::REGULAR: {
|
||||
instanceId = queryInstanceName();
|
||||
} break;
|
||||
}
|
||||
} else {
|
||||
instanceId = queryInstanceName();
|
||||
}
|
||||
} else {
|
||||
// don't offer portable instance if we can't set one up.
|
||||
instanceId = chooseInstance(instanceList);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user