summaryrefslogtreecommitdiff
path: root/src/installationmanager.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-05-10 10:57:35 +0200
committerTannin <devnull@localhost>2013-05-10 10:57:35 +0200
commit9bc123e8e2dbd17508a68e4afc2eb881873601bd (patch)
tree9e082b7cfca4069d4f47f2a639b570b9ad0a167a /src/installationmanager.cpp
parentd161e1a0d61181185323fcb547d9e0651d546fb2 (diff)
- initial support for exposing the nexusbridge to python
- started improving usability of nexus bridge - support for installers implemented in python
Diffstat (limited to 'src/installationmanager.cpp')
-rw-r--r--src/installationmanager.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp
index 16761f24..52ef01c1 100644
--- a/src/installationmanager.cpp
+++ b/src/installationmanager.cpp
@@ -693,7 +693,7 @@ bool InstallationManager::install(const QString &fileName, const QString &modsDi
GuessedValue<QString> &modName, bool &hasIniTweaks)
{
QFileInfo fileInfo(fileName);
- bool success = false;
+// bool success = false;
if (m_SupportedExtensions.find(fileInfo.suffix()) == m_SupportedExtensions.end()) {
reportError(tr("File format \"%1\" not supported").arg(fileInfo.completeSuffix()));
return false;
@@ -706,7 +706,7 @@ bool InstallationManager::install(const QString &fileName, const QString &modsDi
QString version = "";
QString newestVersion = "";
int categoryID = 0;
- bool nameGuessed = false;
+// bool nameGuessed = false;
QString metaName = fileName.mid(0).append(".meta");
if (QFile(metaName).exists()) {
@@ -804,10 +804,14 @@ bool InstallationManager::install(const QString &fileName, const QString &modsDi
return false;
} break;
case IPluginInstaller::RESULT_SUCCESS: {
- DirectoryTree::node_iterator iniTweakNode = filesTree->nodeFind(DirectoryTreeInformation("INI Tweaks"));
- hasIniTweaks = (iniTweakNode != filesTree->nodesEnd()) &&
- ((*iniTweakNode)->numLeafs() != 0);
- return true;
+ if (filesTree != NULL) {
+ DirectoryTree::node_iterator iniTweakNode = filesTree->nodeFind(DirectoryTreeInformation("INI Tweaks"));
+ hasIniTweaks = (iniTweakNode != filesTree->nodesEnd()) &&
+ ((*iniTweakNode)->numLeafs() != 0);
+ return true;
+ } else {
+ return false;
+ }
} break;
}
}