summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@digia.com>2013-09-25 11:56:39 +0200
committerTim Jenssen <tim.jenssen@digia.com>2013-09-27 09:02:09 +0200
commita25620f52693e086b54c09518d4b7a0cab412da1 (patch)
tree0b49780d9cf00cac512dc49547a875803005012f /src
parentfc465784df7893abc180ede9b69b4e27aaa522f7 (diff)
move creating the temp remoterepo dir
- in case we are getting a new repository it gets a reset which starts from the beginning. So it is better to create that at the end. Change-Id: I6613ce899fd695e6df8825290a7d945a67d61168 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/libs/installer/getrepositorymetainfojob.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/libs/installer/getrepositorymetainfojob.cpp b/src/libs/installer/getrepositorymetainfojob.cpp
index c0fca0b13..2fd167a4a 100644
--- a/src/libs/installer/getrepositorymetainfojob.cpp
+++ b/src/libs/installer/getrepositorymetainfojob.cpp
@@ -244,20 +244,7 @@ void GetRepositoryMetaInfoJob::updatesXmlDownloadFinished()
Q_ASSERT(!fn.isEmpty());
Q_ASSERT(QFile::exists(fn));
- try {
- m_temporaryDirectory = createTemporaryDirectory(QLatin1String("remoterepo-"));
- m_tempDirDeleter.add(m_temporaryDirectory);
- } catch (const QInstaller::Error& e) {
- finished(QInstaller::ExtractionError, e.message());
- return;
- }
-
QFile updatesFile(fn);
- if (!updatesFile.rename(m_temporaryDirectory + QLatin1String("/Updates.xml"))) {
- finished(QInstaller::DownloadError, tr("Could not move Updates.xml to target location. Error: %1")
- .arg(updatesFile.errorString()));
- return;
- }
if (!updatesFile.open(QIODevice::ReadOnly)) {
finished(QInstaller::DownloadError, tr("Could not open Updates.xml for reading. Error: %1")
@@ -358,6 +345,19 @@ void GetRepositoryMetaInfoJob::updatesXmlDownloadFinished()
}
}
+ try {
+ m_temporaryDirectory = createTemporaryDirectory(QLatin1String("remoterepo-"));
+ m_tempDirDeleter.add(m_temporaryDirectory);
+ } catch (const QInstaller::Error& e) {
+ finished(QInstaller::ExtractionError, e.message());
+ return;
+ }
+ if (!updatesFile.rename(m_temporaryDirectory + QLatin1String("/Updates.xml"))) {
+ finished(QInstaller::DownloadError, tr("Could not move Updates.xml to target location. Error: %1")
+ .arg(updatesFile.errorString()));
+ return;
+ }
+
setTotalAmount(m_packageNames.count() + 1);
setProcessedAmount(1);
emit infoMessage(this, tr("Finished updating component meta information."));