]> git.saurik.com Git - apt.git/commitdiff
* methods/mirror.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 30 Nov 2006 10:06:09 +0000 (11:06 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 30 Nov 2006 10:06:09 +0000 (11:06 +0100)
  - check the complette queue on Fetch() for urls to transform

methods/mirror.cc

index 1911d61157000e490d4a9fe3884aa2d65c710be1..4de9815222baed78da0ee748db4f046cf36a338e 100644 (file)
@@ -32,6 +32,7 @@ using namespace std;
  * - support keeping the mirror file around (evil listclearer strikes again)
  *   -> /var/lib/apt/mirrors dir? how to cleanup? by time?
  * - provide some TTL time until the mirror file is get again (1h? 6h?)
+ * - deal with runing as non-root (we can't write to the lists dir then)
  * - testing :)
  */
 
@@ -109,8 +110,11 @@ bool MirrorMethod::Fetch(FetchItem *Itm)
       SelectMirror();
    }
 
-   if(Queue->Uri.find("mirror://") != string::npos)
-      Queue->Uri.replace(0,BaseUri.size(),Mirror);
+   for (FetchItem *I = Queue; I != 0; I = I->Next)
+   {
+      if(I->Uri.find("mirror://") != string::npos)
+        I->Uri.replace(0,BaseUri.size(),Mirror);
+   }
 
    // now run the real fetcher
    return HttpMethod::Fetch(Itm);