summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 503ad7dae..679f9cee7 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -711,13 +711,13 @@ 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(URI(Desc.URI).Path);
const char *decompProg;
if(compExt == "bz2")
decompProg = "bzip2";
else if(compExt == ".gz")
decompProg = "gzip";
- else if(compExt == "ges" || compExt == "ces") // packaGES or sourCES
+ else if(compExt == "")
decompProg = "copy";
else {
_error->Error("Unsupported extension: %s", compExt.c_str());