Explorar o código

do not create an (additional) empty compressor

FileFd code knows how to deal with such a compressor, so it isn't a
problem, but it is absolutely not needed as we already have an
(matching) identity compressor with '.' earlier in the list.

Git-Dch: Ignore
David Kalnischkies %!s(int64=12) %!d(string=hai) anos
pai
achega
8056a00cd7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      apt-pkg/aptconfiguration.cc

+ 1 - 1
apt-pkg/aptconfiguration.cc

@@ -476,7 +476,7 @@ const Configuration::getCompressors(bool const Cached) {
 	std::vector<std::string> const comp = _config->FindVector("APT::Compressor");
 	for (std::vector<std::string>::const_iterator c = comp.begin();
 	     c != comp.end(); ++c) {
-		if (*c == "." || *c == "gzip" || *c == "bzip2" || *c == "lzma" || *c == "xz")
+		if (c->empty() || *c == "." || *c == "gzip" || *c == "bzip2" || *c == "lzma" || *c == "xz")
 			continue;
 		compressors.push_back(Compressor(c->c_str(), std::string(".").append(*c).c_str(), c->c_str(), "-9", "-d", 100));
 	}