~racb/ubuntu/quantal/apt/by_hash

« back to all changes in this revision

Viewing changes to methods/https.cc

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2011-09-20 18:26:13 UTC
  • Revision ID: package-import@ubuntu.com-20110920182613-v9u25taxw6ed2jbi
Tags: 0.8.16~exp5ubuntu10
* methods/https.cc:
  - cleanup broken downloads properly (just like http)

Show diffs side-by-side

added added

removed removed

Lines of Context:
270
270
   long curl_servdate;
271
271
   curl_easy_getinfo(curl, CURLINFO_FILETIME, &curl_servdate);
272
272
 
 
273
   File->Close();
 
274
 
273
275
   // cleanup
274
276
   if(success != 0) 
275
277
   {
276
278
      _error->Error("%s", curl_errorstr);
 
279
      // unlink, no need keep 401/404 page content in partial/
 
280
      unlink(File->Name().c_str());
277
281
      Fail();
278
282
      return true;
279
283
   }
280
 
   File->Close();
281
284
 
282
285
   // Timestamp
283
286
   struct utimbuf UBuf;