diff options
Diffstat (limited to 'apt-pkg/aptconfiguration.cc')
-rw-r--r-- | apt-pkg/aptconfiguration.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 2a441fce7..b23e12acb 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -388,6 +388,19 @@ const Configuration::getCompressors(bool const Cached) { return compressors; } /*}}}*/ +// getCompressorExtensions - supported data.tar extensions /*{{{*/ +// --------------------------------------------------------------------- +/* */ +std::vector<std::string> const Configuration::getCompressorExtensions() { + std::vector<APT::Configuration::Compressor> const compressors = getCompressors(); + std::vector<std::string> ext; + for (std::vector<APT::Configuration::Compressor>::const_iterator c = compressors.begin(); + c != compressors.end(); ++c) + if (c->Extension.empty() == false && c->Extension != ".") + ext.push_back(c->Extension); + return ext; +} + /*}}}*/ // Compressor constructor /*{{{*/ // --------------------------------------------------------------------- /* */ |