summaryrefslogtreecommitdiffstats
path: root/src/deps_log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/deps_log.cc')
-rw-r--r--src/deps_log.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/deps_log.cc b/src/deps_log.cc
index ce9bf06..63e0d95 100644
--- a/src/deps_log.cc
+++ b/src/deps_log.cc
@@ -43,7 +43,6 @@ DepsLog::~DepsLog() {
bool DepsLog::OpenForWrite(const string& path, string* err) {
if (needs_recompaction_) {
- Close();
if (!Recompact(path, err))
return false;
}
@@ -265,6 +264,7 @@ bool DepsLog::Recompact(const string& path, string* err) {
METRIC_RECORD(".ninja_deps recompact");
printf("Recompacting deps...\n");
+ Close();
string temp_path = path + ".recompact";
// OpenForWrite() opens for append. Make sure it's not appending to a