aboutsummaryrefslogtreecommitdiff
path: root/installer/process
diff options
context:
space:
mode:
authorVictor Tran <vicr12345@gmail.com>2019-01-16 00:35:20 +1100
committerVictor Tran <vicr12345@gmail.com>2019-01-16 00:35:20 +1100
commite9058c61e2c78f6e5e04c8e5aa3c44a1e0d02434 (patch)
treee01bae02de01a7f08a13a7e8ce4038a983e3d970 /installer/process
parent8a5b13e73a1ade01eb4ecc5f32de0f18026c46a6 (diff)
downloadtheInstaller-e9058c61e2c78f6e5e04c8e5aa3c44a1e0d02434.tar.gz
theInstaller-e9058c61e2c78f6e5e04c8e5aa3c44a1e0d02434.tar.bz2
theInstaller-e9058c61e2c78f6e5e04c8e5aa3c44a1e0d02434.zip
Abort on download error
Diffstat (limited to 'installer/process')
-rw-r--r--installer/process/installworker.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/installer/process/installworker.cpp b/installer/process/installworker.cpp
index a297420..d4f5c5b 100644
--- a/installer/process/installworker.cpp
+++ b/installer/process/installworker.cpp
@@ -91,6 +91,10 @@ bool InstallWorker::startWork() {
lastBytesReceived = 0;
lastTimeUpdate = QDateTime::fromMSecsSinceEpoch(0);
connect(reply, &QNetworkReply::finished, [=] {
+ if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() != 200) {
+ QApplication::exit(1);
+ return;
+ }
packageFile.flush();
packageFile.seek(0);