diff options
Diffstat (limited to 'src/deps_log.cc')
-rw-r--r-- | src/deps_log.cc | 9 |
1 files 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; |