Skip to content

Commit

Permalink
Add manual calls to flush and close (though the destructor should do it)
Browse files Browse the repository at this point in the history
  • Loading branch information
yamadapc committed May 28, 2024
1 parent e36eb50 commit c313651
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/watchman/WatchmanBackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ void WatchmanBackend::writeSnapshot(Watcher &watcher, std::string *snapshotPath)
{
std::ofstream ofs(temporaryFilePath);
ofs << clockValue;
ofs.flush();
ofs.close();
}
std::filesystem::rename(temporaryFilePath, *snapshotPath);
}
Expand Down

0 comments on commit c313651

Please sign in to comment.