From 01dbebdfc81abab00048f48e68a4e04d391bc50e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 21 Dec 2013 14:25:16 +0100 Subject: Fix issues with the updater * Bad URLs used for downloading update files * MD5ETagDownload resetting the expected ETag after failure to the failed file MD5 checksum * Delete MD5ETagDownload downloaded files if the download fails. --- logic/updater/DownloadUpdateTask.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'logic/updater') diff --git a/logic/updater/DownloadUpdateTask.cpp b/logic/updater/DownloadUpdateTask.cpp index cc06104a..b017afeb 100644 --- a/logic/updater/DownloadUpdateTask.cpp +++ b/logic/updater/DownloadUpdateTask.cpp @@ -396,7 +396,6 @@ DownloadUpdateTask::processFileLists(NetJob *job, // We need to download the file to the updatefiles folder and add a task // to copy it to its install path. auto download = MD5EtagDownload::make(source.url, dlPath); - download->m_check_md5 = true; download->m_expected_md5 = entry.md5; job->addNetAction(download); } @@ -487,9 +486,13 @@ bool DownloadUpdateTask::writeInstallScript(UpdateOperationList &opsList, QStrin QString DownloadUpdateTask::preparePath(const QString &path) { - QString foo = path; - foo.replace("$PWD", qApp->applicationDirPath()); - return QUrl::fromLocalFile(foo).toString(QUrl::FullyEncoded); + if(path.startsWith("$PWD")) + { + QString foo = path; + foo.replace("$PWD", qApp->applicationDirPath()); + return QUrl::fromLocalFile(foo).toString(QUrl::FullyEncoded); + } + return path; } void DownloadUpdateTask::fileDownloadFinished() -- cgit v1.2.3