summaryrefslogtreecommitdiffstats
path: root/src/graph.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-10-06 00:51:06 (GMT)
committerEvan Martin <martine@danga.com>2011-10-06 00:51:06 (GMT)
commite54d2b6c8bbb78b238160c7f31ae8515c15183d9 (patch)
tree2566a133dfda2675b55c896dbf22f95a7bbfced5 /src/graph.cc
parent06ab305be33ff4899016c746ee8a3557291ebe09 (diff)
downloadNinja-e54d2b6c8bbb78b238160c7f31ae8515c15183d9.zip
Ninja-e54d2b6c8bbb78b238160c7f31ae8515c15183d9.tar.gz
Ninja-e54d2b6c8bbb78b238160c7f31ae8515c15183d9.tar.bz2
make CanonicalizePath report an error on empty path
Fixes part of issue 121, but the fix exposed a further issue.
Diffstat (limited to 'src/graph.cc')
-rw-r--r--src/graph.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/graph.cc b/src/graph.cc
index 16299c0..0f16519 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -178,7 +178,8 @@ bool Edge::LoadDepFile(State* state, DiskInterface* disk_interface,
for (vector<StringPiece>::iterator i = makefile.ins_.begin();
i != makefile.ins_.end(); ++i, ++implicit_dep) {
string path(i->str_, i->len_);
- CanonicalizePath(&path);
+ if (!CanonicalizePath(&path, err))
+ return false;
Node* node = state->GetNode(path);
*implicit_dep = node;