From eb901e0dfcc9fd76d3ffbc68681857b368e26fd0 Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Thu, 10 Sep 2015 22:35:22 +0100 Subject: This fixes some resource leaks with archive handling --- src/installationmanager.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/installationmanager.cpp') diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 0f66a7e8..75abd750 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -676,6 +676,11 @@ bool InstallationManager::install(const QString &fileName, GuessedValue } qDebug("using mod name \"%s\" (id %d) -> %s", modName->toUtf8().constData(), modID, qPrintable(m_CurrentFile)); + //If there's an archive already open, close it. This happens with the bundle + //installer when it uncompresses a split archive, then finds it has a real archive + //to deal with. + m_CurrentArchive->close(); + // open the archive and construct the directory tree the installers work on bool archiveOpen = m_CurrentArchive->open(ToWString(QDir::toNativeSeparators(fileName)).c_str(), new MethodCallback(this, &InstallationManager::queryPassword)); -- cgit v1.3.1