aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-01-31 13:54:04 -0800
committerDan Willemsen <dwillemsen@google.com>2018-01-31 17:00:32 -0800
commit2ac11b6c8d7542e946f7dbb65be283c3ced37de8 (patch)
tree54be2b3c5fa834b7ad8e8584fb8dc6cac7552a09
parent8aba2458a403479f0743fbc6d35392ae8e598fd1 (diff)
downloadkati-2ac11b6c8d7542e946f7dbb65be283c3ced37de8.tar.gz
Support different findleaves.py path
In newer android trees, build/tools is a symlink to build/make/tools, and we've started referring to build/make/tools/findleaves.py instead of build/tools/findleaves.py. Accept either for purposes of the find emulator. Change-Id: I3ce66ed3806bff3549a61e85652283bd6f30dc2e
-rw-r--r--find.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/find.cc b/find.cc
index a1675d2..1b9e23f 100644
--- a/find.cc
+++ b/find.cc
@@ -733,7 +733,8 @@ class FindCommandParser {
if (!GetNextToken(&tok) || !tok.empty())
return false;
return true;
- } else if (tok == "build/tools/findleaves.py") {
+ } else if (tok == "build/tools/findleaves.py" ||
+ tok == "build/make/tools/findleaves.py") {
if (!ParseFindLeaves())
return false;
return true;
@@ -1033,7 +1034,8 @@ FindCommand::~FindCommand() {}
bool FindCommand::Parse(const string& cmd) {
FindCommandParser fcp(cmd, this);
- if (!HasWord(cmd, "find") && !HasWord(cmd, "build/tools/findleaves.py"))
+ if (!HasWord(cmd, "find") && !HasWord(cmd, "build/tools/findleaves.py") &&
+ !HasWord(cmd, "build/make/tools/findleaves.py"))
return false;
if (!fcp.Parse())