Browse Source

merged from bzr+ssh://bazaar.launchpad.net/~donkult/apt/sid/

Michael Vogt 14 years ago
parent
commit
03d6479dd7
1 changed files with 4 additions and 2 deletions
  1. 4 2
      apt-pkg/aptconfiguration.cc

+ 4 - 2
apt-pkg/aptconfiguration.cc

@@ -61,12 +61,14 @@ const Configuration::getCompressionTypes(bool const &Cached) {
 		if ((*o).empty() == true)
 		if ((*o).empty() == true)
 			continue;
 			continue;
 		// ignore types we have no method ready to use
 		// 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;
 			continue;
 		// ignore types we have no app ready to use
 		// 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();
 		std::vector<APT::Configuration::Compressor>::const_iterator c = compressors.begin();
 		for (; c != compressors.end(); ++c)
 		for (; c != compressors.end(); ++c)
-			if (c->Name == *o)
+			if (c->Name == app)
 				break;
 				break;
 		if (c == compressors.end())
 		if (c == compressors.end())
 			continue;
 			continue;