From ceb2cea0b4ddddf44bbf4bbe5ce495ade375b0cf Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 19 Feb 2018 11:33:43 +0100 Subject: indexcopy: Copy uncompressed indices from cdrom again This was broken by a refactoring in 1adcf56bec7d2127d83aa423916639740fe8e586 which iterated over getCompressorExtensions() instead of the compressors and using their extension field. getCompressorExtensions() does not contain the empty extension for uncompressed files, though, and hence this was broken. LP: #1746807 --- apt-pkg/indexcopy.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/indexcopy.cc') diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 872adcaa8..8704da80a 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -63,9 +63,9 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List, struct stat Buf; bool found = false; auto const file = F + GetFileName(); - for (auto const &ext: APT::Configuration::getCompressorExtensions()) + for (auto const &c : compressor) { - if (stat((file + ext).c_str(), &Buf) != 0) + if (stat((file + c.Extension).c_str(), &Buf) != 0) continue; found = true; break; -- cgit v1.2.3