else
CompressionExtension = ".gz";
} else {
- CompressionExtension = comprExt;
+ CompressionExtension = (comprExt == "plain" ? "" : comprExt);
}
- Desc.URI = URI + (CompressionExtension == "plain" ? "" : CompressionExtension);
+ Desc.URI = URI + CompressionExtension;
Desc.Description = URIDesc;
Desc.Owner = this;
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());