This will make the build log compaction work on Windows.
It will also make the tests no longer leave a temp log file around.
return true; // Do nothing, report success.
if (needs_recompaction_) {
+ Close();
if (!Recompact(path, err))
return false;
}
if (total_entry_count > unique_entry_count * kCompactionRatio)
needs_recompaction_ = true;
+ fclose(file);
+
return true;
}
}
fclose(f);
+ if (unlink(path.c_str()) < 0) {
+ *err = strerror(errno);
+ return false;
+ }
if (rename(temp_path.c_str(), path.c_str()) < 0) {
*err = strerror(errno);