summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2018-02-19 11:33:43 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2018-02-19 11:33:43 +0100
commitceb2cea0b4ddddf44bbf4bbe5ce495ade375b0cf (patch)
tree2cb1396e6b84461208ad5699149082d6dc24a962
parent38d444af2632219ab399dabadaaefaa4dcdd6ebf (diff)
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
-rw-r--r--apt-pkg/indexcopy.cc4
1 files changed, 2 insertions, 2 deletions
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<string> &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;