From: Michael Vogt Date: Tue, 20 Sep 2011 16:26:39 +0000 (+0200) Subject: * methods/https.cc: X-Git-Tag: 0.9.13.exp1ubuntu1~132 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/2bde2334b3be5279d044fe552d0ff5ce38db1763?ds=sidebyside;hp=--cc * methods/https.cc: - cleanup broken downloads properly (just like http) --- 2bde2334b3be5279d044fe552d0ff5ce38db1763 diff --git a/debian/changelog b/debian/changelog index 205692011..4fed33ae3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +apt (0.8.16~exp5ubuntu10) oneiric; urgency=low + + * methods/https.cc: + - cleanup broken downloads properly (just like http) + + -- Michael Vogt Tue, 20 Sep 2011 18:26:13 +0200 + apt (0.8.16~exp5ubuntu9) oneiric; urgency=low [ Michael Vogt ] 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;