diff options
author | von Heydebrand Julian <j.heydebrand@de.ccv.eu> | 2024-03-13 15:21:22 (GMT) |
---|---|---|
committer | von Heydebrand Julian <j.heydebrand@de.ccv.eu> | 2024-03-21 08:17:28 (GMT) |
commit | 878aa468d144d854005a6d4f0c7785a5185f0bf9 (patch) | |
tree | be43c707969567078eca6336e38272b0bf7b6ac8 /src | |
parent | 9279832b28f2a7be30245d503b2ba974c3487a48 (diff) | |
download | Ninja-878aa468d144d854005a6d4f0c7785a5185f0bf9.zip Ninja-878aa468d144d854005a6d4f0c7785a5185f0bf9.tar.gz Ninja-878aa468d144d854005a6d4f0c7785a5185f0bf9.tar.bz2 |
Gracefully handle outdated .ninja_log during '-t recompact'
When we explicitly unlink the file we should return LOAD_NOT_FOUND instead of LOAD_SUCCESS
Diffstat (limited to 'src')
-rw-r--r-- | src/build_log.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/build_log.cc b/src/build_log.cc index cf21182..792d1a3 100644 --- a/src/build_log.cc +++ b/src/build_log.cc @@ -291,9 +291,9 @@ LoadStatus BuildLog::Load(const string& path, string* err) { if (invalid_log_version) { fclose(file); unlink(path.c_str()); - // Don't report this as a failure. An empty build log will cause + // Don't report this as a failure. A missing build log will cause // us to rebuild the outputs anyway. - return LOAD_SUCCESS; + return LOAD_NOT_FOUND; } } |