summaryrefslogtreecommitdiff
path: root/methods/https.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-10-07 08:16:51 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-10-07 08:16:51 +0200
commit62acbba8d1e8c9f395ccd1068e89bf14a93d4aa8 (patch)
tree56dde1180eb55d7b14b3d3c02b9b20c2e2d530cb /methods/https.cc
parenta2d40703e4a5590a689ace4466f92e590434944d (diff)
methods/https.cc: use File->Tell() here too
Diffstat (limited to 'methods/https.cc')
-rw-r--r--methods/https.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/methods/https.cc b/methods/https.cc
index eec858417..f8e84a2ff 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -82,8 +82,7 @@ HttpsMethod::write_data(void *buffer, size_t size, size_t nmemb, void *userp)
if(me->File->Write(buffer, size*nmemb) != true)
return false;
- me->TotalWritten += size*nmemb;
- if(me->TotalWritten > me->Queue->ExpectedSize)
+ if(me->Queue->ExpectedSize > 0 && me->File->Tell() > me->Queue->ExpectedSize)
return _error->Error("Writing more data than expected (%llu > %llu)",
me->TotalWritten, me->Queue->ExpectedSize);