diff options
Diffstat (limited to 'src/build_log.cc')
-rw-r--r-- | src/build_log.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/build_log.cc b/src/build_log.cc index c630fbe..2050ffc 100644 --- a/src/build_log.cc +++ b/src/build_log.cc @@ -206,6 +206,11 @@ bool BuildLog::Recompact(const string& path, string* err) { return false; } + if (fwrite(kFileSignature, sizeof(kFileSignature) - 1, 1, log_file_) < 1) { + *err = strerror(errno); + return false; + } + for (Log::iterator i = log_.begin(); i != log_.end(); ++i) { WriteEntry(f, *i->second); } |