From e801e67a4cfae117098f252d365d67704eba4bfd Mon Sep 17 00:00:00 2001 From: Evan Martin Date: Tue, 8 Jan 2013 08:17:12 -0800 Subject: [PATCH] make old deps format migration actually work --- src/deps_log.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/deps_log.cc b/src/deps_log.cc index 5706be4..081fcf0 100644 --- a/src/deps_log.cc +++ b/src/deps_log.cc @@ -128,12 +128,11 @@ bool DepsLog::Load(const string& path, State* state, string* err) { return false; } int version = 0; - if (sscanf(buf, kFileSignature, &version) != 1) { - *err = "unable to read file signature"; - return false; - } + sscanf(buf, kFileSignature, &version); if (version != kCurrentVersion) { - *err = "bad deps log version; starting over"; + *err = "bad deps log signature or version; starting over"; + fclose(f); + unlink(path.c_str()); // Don't report this as a failure. An empty deps log will cause // us to rebuild the outputs anyway. return true; -- 2.7.4