From 2bde2334b3be5279d044fe552d0ff5ce38db1763 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 20 Sep 2011 18:26:39 +0200 Subject: * methods/https.cc: - cleanup broken downloads properly (just like http) --- methods/https.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'methods') 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; -- cgit v1.2.3