summaryrefslogtreecommitdiff
path: root/src/installationmanager.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-09-02 18:51:17 +0200
committerTannin <devnull@localhost>2013-09-02 18:51:17 +0200
commit0fa7155eb831dbc16fe0609f83c2755bb2b5dc24 (patch)
treec81897533cd5485ecbf457f71b78847b6a4aca0e /src/installationmanager.cpp
parentc6c61ce7920897d1e3e34088ee48d9f24b0dd7ec (diff)
- bugfix: division-by-zero error in the newly introduced server-speed calculation
- bugfix: temp files extracted during fomod installation were not cleaned up. This still doesn't remove directories - bugfix: fomod installer didn't find the installer xmls because they are in a subdirectory since release 0.99.4
Diffstat (limited to 'src/installationmanager.cpp')
-rw-r--r--src/installationmanager.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp
index 5d00142d..af2e6852 100644
--- a/src/installationmanager.cpp
+++ b/src/installationmanager.cpp
@@ -152,7 +152,6 @@ bool InstallationManager::unpackSingleFile(const QString &fileName)
if (_wcsicmp(data[i]->getFileName(), ToWString(fileName).c_str()) == 0) {
available = true;
data[i]->setSkip(false);
-qDebug("usf %ls -> %s", data[i]->getFileName(), qPrintable(baseName));
data[i]->setOutputFileName(ToWString(baseName).c_str());
m_TempFilesToDelete.insert(baseName);
} else {
@@ -727,6 +726,13 @@ bool InstallationManager::install(const QString &fileName, GuessedValue<QString>
qPrintable(installer->name()), e.what());
}
+ // clean up temp files
+ // TODO: this doesn't yet remove directories. Also, the files may be left there if this point isn't reached
+ foreach (const QString &tempFile, m_TempFilesToDelete) {
+ QFile::remove(QDir::tempPath() + "/" + tempFile);
+ }
+
+
// act upon the installation result. at this point the files have already been
// extracted to the correct location
switch (installResult) {