projects
/
platform
/
upstream
/
ninja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eccebff
)
quick fix: write out signature in recompaction
author
Evan Martin
<martine@danga.com>
Wed, 11 May 2011 18:33:55 +0000
(11:33 -0700)
committer
Evan Martin
<martine@danga.com>
Wed, 11 May 2011 18:33:55 +0000
(11:33 -0700)
This needs refactoring but I already pushed the bad code so this
hopefully makes it less broken.
src/build_log.cc
patch
|
blob
|
history
diff --git
a/src/build_log.cc
b/src/build_log.cc
index
c630fbe
..
2050ffc
100644
(file)
--- 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);
}