From 9bc123e8e2dbd17508a68e4afc2eb881873601bd Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 10 May 2013 10:57:35 +0200 Subject: - initial support for exposing the nexusbridge to python - started improving usability of nexus bridge - support for installers implemented in python --- src/installationmanager.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/installationmanager.cpp') 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 &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; } } -- cgit v1.3.1