summaryrefslogtreecommitdiffstats
path: root/src/deps_log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/deps_log.cc')
-rw-r--r--src/deps_log.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/deps_log.cc b/src/deps_log.cc
index 39de180..d889dfd 100644
--- a/src/deps_log.cc
+++ b/src/deps_log.cc
@@ -233,14 +233,20 @@ bool DepsLog::Load(const string& path, State* state, string* err) {
if (!UpdateDeps(out_id, deps))
++unique_dep_record_count;
} else {
- int path_size = size - 4;
+ size_t path_size = size - 4;
assert(path_size > 0); // CanonicalizePath() rejects empty paths.
// There can be up to 3 bytes of padding.
if (buf[path_size - 1] == '\0') --path_size;
if (buf[path_size - 1] == '\0') --path_size;
if (buf[path_size - 1] == '\0') --path_size;
+ unsigned int slash_bits;
+ string err;
+ if (!CanonicalizePath(&buf[0], &path_size, &slash_bits, &err)) {
+ read_failed = true;
+ break;
+ }
StringPiece path(buf, path_size);
- Node* node = state->GetNode(path);
+ Node* node = state->GetNode(path, slash_bits);
// Check that the expected index matches the actual index. This can only
// happen if two ninja processes write to the same deps log concurrently.