diff options
| author | Tom Tanner <thosrtanner2@users.sourceforge.net> | 2015-09-10 22:35:22 +0100 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-09-26 11:54:27 +0100 |
| commit | eb901e0dfcc9fd76d3ffbc68681857b368e26fd0 (patch) | |
| tree | dd651d7c041aadadfb4718dd0be4e04cddbcd8db /src/installationmanager.cpp | |
| parent | ae82ab7dca062ab65983e01c6ea49843563ae898 (diff) | |
This fixes some resource leaks with archive handling
Diffstat (limited to 'src/installationmanager.cpp')
| -rw-r--r-- | src/installationmanager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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<QString> }
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<InstallationManager, void, LPSTR>(this, &InstallationManager::queryPassword));
|
