Просмотр исходного кода

apt-pkg/acquire-item.cc: do not hardcode "Packages" or "Sources" in the (generic) acquire-item.cc code

Michael Vogt лет назад: 17
Родитель
Сommit
708ead3a44
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      apt-pkg/acquire-item.cc

+ 2 - 1
apt-pkg/acquire-item.cc

@@ -717,7 +717,8 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
       decompProg = "bzip2";
    else if(compExt == "gz") 
       decompProg = "gzip";
-   else if(compExt == "Packages" || compExt == "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());