]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.cc
Documented '--no-install-recommends' in apt-get manpage.
[apt.git] / apt-pkg / acquire-item.cc
index 503ad7dae9f5dedaab73783a3388ad713309dc63..ae8ff220594e311bc0909f9a8f50a7cfb5c4e48a 100644 (file)
@@ -711,13 +711,14 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
    else
       Local = true;
    
-   string compExt = Desc.URI.substr(Desc.URI.size()-3);
+   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 == "ges" || compExt == "ces") // packaGES or sourCES
+   // flExtensions returns the full name if no extension is found
+   else if(compExt == flNotDir(URI(Desc.URI).Path))
       decompProg = "copy";
    else {
       _error->Error("Unsupported extension: %s", compExt.c_str());