AAPT2: Make sure to fail when XML linking fails

Bug: 64367402
Test: manual
Change-Id: I3082887f5e449d8d0dac2aad93a834eb346008ba
This commit is contained in:
Adam Lesinski
2017-08-07 11:56:32 -07:00
parent c4913b6499
commit de7b742335

View File

@@ -574,6 +574,11 @@ bool ResourceFileFlattener::Flatten(ResourceTable* table, IArchiveWriter* archiv
if (file_op.xml_to_flatten) {
std::vector<std::unique_ptr<xml::XmlResource>> versioned_docs =
LinkAndVersionXmlFile(table, &file_op);
if (versioned_docs.empty()) {
error = true;
continue;
}
for (std::unique_ptr<xml::XmlResource>& doc : versioned_docs) {
std::string dst_path = file_op.dst_path;
if (doc->file.config != file_op.config) {