]> git.saurik.com Git - apt.git/commitdiff
* methods/https.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 20 Sep 2011 16:26:39 +0000 (18:26 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 20 Sep 2011 16:26:39 +0000 (18:26 +0200)
  - cleanup broken downloads properly (just like http)

debian/changelog
methods/https.cc

index 205692011c1b80a9d705c7fb4ff4970c8514df93..4fed33ae3d17b95141399a3c09b3b8eeea0d17d2 100644 (file)
@@ -1,3 +1,10 @@
+apt (0.8.16~exp5ubuntu10) oneiric; urgency=low
+
+  * methods/https.cc:
+    - cleanup broken downloads properly (just like http)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 20 Sep 2011 18:26:13 +0200
+
 apt (0.8.16~exp5ubuntu9) oneiric; urgency=low
 
   [ Michael Vogt ]
 apt (0.8.16~exp5ubuntu9) oneiric; urgency=low
 
   [ Michael Vogt ]
index fc649d6c217f800aad3ba147e9a8ff1320394f38..668a329e6ba12a8baca3fbd7247181da9457d4d8 100644 (file)
@@ -270,14 +270,17 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
    long curl_servdate;
    curl_easy_getinfo(curl, CURLINFO_FILETIME, &curl_servdate);
 
    long curl_servdate;
    curl_easy_getinfo(curl, CURLINFO_FILETIME, &curl_servdate);
 
+   File->Close();
+
    // cleanup
    if(success != 0) 
    {
       _error->Error("%s", curl_errorstr);
    // 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;
    }
       Fail();
       return true;
    }
-   File->Close();
 
    // Timestamp
    struct utimbuf UBuf;
 
    // Timestamp
    struct utimbuf UBuf;