summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-05-01 02:46:33 (GMT)
committerEvan Martin <martine@danga.com>2011-05-01 02:52:02 (GMT)
commit5c7ac5c72d986570766db0ce9b9a9714ff8a4032 (patch)
tree46dd7a1c4b4862055fd46b3686494087bc2ef6a6 /src
parente783554ff5297711ef4c28a01e0c7e0d59a808d5 (diff)
downloadNinja-5c7ac5c72d986570766db0ce9b9a9714ff8a4032.zip
Ninja-5c7ac5c72d986570766db0ce9b9a9714ff8a4032.tar.gz
Ninja-5c7ac5c72d986570766db0ce9b9a9714ff8a4032.tar.bz2
canonicalize paths in refactored function
Diffstat (limited to 'src')
-rw-r--r--src/ninja.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ninja.cc b/src/ninja.cc
index 950c610..96530f6 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -114,11 +114,14 @@ bool CollectTargetsFromArgs(State* state, int argc, char* argv[],
return false;
} else {
for (int i = 0; i < argc; ++i) {
- Node* node = state->LookupNode(argv[i]);
+ string path = argv[i];
+ if (!CanonicalizePath(&path, err))
+ return false;
+ Node* node = state->LookupNode(path);
if (node) {
targets->push_back(node);
} else {
- *err = string("unknown target '") + argv[i] + "'";
+ *err = "unknown target '" + path + "'";
return false;
}
}