]> git.saurik.com Git - apt.git/commitdiff
apt-pkg/acquire-item.cc: fixed my incorrect use of flExtension
authorMichael Vogt <egon@tas>
Wed, 29 Oct 2008 08:27:11 +0000 (09:27 +0100)
committerMichael Vogt <egon@tas>
Wed, 29 Oct 2008 08:27:11 +0000 (09:27 +0100)
apt-pkg/acquire-item.cc

index 679f9cee7e0850a063872cc22c1c9bae9957d249..cf835f5d59ad33d014ba6ecbddbd09ba0a81d703 100644 (file)
@@ -711,13 +711,13 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
    else
       Local = true;
    
-   string compExt = flExtension(URI(Desc.URI).Path);
+   string compExt = flExtension(flNotDir(URI(Desc.URI).Path));
    const char *decompProg;
    if(compExt == "bz2") 
       decompProg = "bzip2";
-   else if(compExt == ".gz") 
+   else if(compExt == "gz") 
       decompProg = "gzip";
-   else if(compExt == "")
+   else if(compExt == "Packages" || compExt == "Sources")
       decompProg = "copy";
    else {
       _error->Error("Unsupported extension: %s", compExt.c_str());