summaryrefslogtreecommitdiff
path: root/apt-pkg/aptconfiguration.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-04-20 11:05:35 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-04-20 11:05:35 +0200
commit79b207bc0a3a7d9cef91f96e6061ea35451c563a (patch)
tree4a218203f3de04ebaf1161246811cdbcaae5d97f /apt-pkg/aptconfiguration.cc
parente6a12579e9e5d5735eda450cf2bb3986d828ab65 (diff)
fix a bug uncovered by the previous commit which checks if a Compressor
preference given by the Order setting is really available before adding it as possible CompressionType.
Diffstat (limited to 'apt-pkg/aptconfiguration.cc')
-rw-r--r--apt-pkg/aptconfiguration.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index f0cd8ebc0..e1225b3e6 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -61,12 +61,14 @@ const Configuration::getCompressionTypes(bool const &Cached) {
if ((*o).empty() == true)
continue;
// ignore types we have no method ready to use
- if (_config->Exists(std::string("Acquire::CompressionTypes::").append(*o)) == false)
+ std::string const method = std::string("Acquire::CompressionTypes::").append(*o);
+ if (_config->Exists(method) == false)
continue;
// ignore types we have no app ready to use
+ std::string const app = _config->Find(method);
std::vector<APT::Configuration::Compressor>::const_iterator c = compressors.begin();
for (; c != compressors.end(); ++c)
- if (c->Name == *o)
+ if (c->Name == app)
break;
if (c == compressors.end())
continue;