diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-09-20 18:21:21 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-09-20 18:21:21 +0200 |
commit | db1f14695ce3e5e49e05f67f3ae2225b6706ec66 (patch) | |
tree | 6e6f0c7be712554f2eb53a33b7ba3884b220921c /methods | |
parent | b36597e050beaca71a481590c3d287ac706f4309 (diff) | |
download | apt-db1f14695ce3e5e49e05f67f3ae2225b6706ec66.tar.gz |
* methods/https.cc:
- cleanup broken downloads properly
Diffstat (limited to 'methods')
-rw-r--r-- | methods/https.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/methods/https.cc b/methods/https.cc index fc649d6c2..668a329e6 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -270,14 +270,17 @@ bool HttpsMethod::Fetch(FetchItem *Itm) long curl_servdate; curl_easy_getinfo(curl, CURLINFO_FILETIME, &curl_servdate); + File->Close(); + // cleanup if(success != 0) { _error->Error("%s", curl_errorstr); + // unlink, no need keep 401/404 page content in partial/ + unlink(File->Name().c_str()); Fail(); return true; } - File->Close(); // Timestamp struct utimbuf UBuf; |