diff options
| author | 2017-09-05 18:53:44 +0000 | |
|---|---|---|
| committer | 2017-09-05 18:53:44 +0000 | |
| commit | 1e22b33f34d7cd72fa11388e65a1cca8a1d41452 (patch) | |
| tree | e8683357fdd89b74da44713265d84e2014a852f5 | |
| parent | 88aa3d0f3e2d53ef99ac7caed838ab02c0d85d80 (diff) | |
| parent | de7b74233513b3b962737d95bf1a73be4282452c (diff) | |
Merge "AAPT2: Make sure to fail when XML linking fails" into oc-mr1-dev
| -rw-r--r-- | tools/aapt2/cmd/Link.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/aapt2/cmd/Link.cpp b/tools/aapt2/cmd/Link.cpp index e6bf3a6f9f56..5ad0cdd995ed 100644 --- a/tools/aapt2/cmd/Link.cpp +++ b/tools/aapt2/cmd/Link.cpp @@ -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) { |