diff options
-rw-r--r-- | src/libs/installer/getrepositorymetainfojob.cpp | 26 |
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.")); |