fix wrong capture pkg.path behavior when Distribution xml contain

whitespace
This commit is contained in:
Ilya Pavlov 2018-09-28 22:25:01 +03:00
parent 2c0081b76d
commit 28ca3f8988

View File

@ -126,7 +126,7 @@ bool DistributionXml::package(const std::string& id, DistributionXml::PkgRef& pk
if (attrVal != nullptr) if (attrVal != nullptr)
pkg.installKbytes = atoi((char*) attrVal); pkg.installKbytes = atoi((char*) attrVal);
if (pkg.path.empty() && node->children && node->children->type == XML_TEXT_NODE) if (pkg.path.empty() && node->children && node->children->type == XML_TEXT_NODE && !xmlIsBlankNode(node->children))
pkg.path = (char*) node->children->content; pkg.path = (char*) node->children->content;
} }