Skip to content

Commit

Permalink
Fix bug in TempFile::rewrite.
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsracz committed Oct 29, 2021
1 parent 5b6fcb9 commit 58d0221
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/os/TempFile.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public:
/// the data to write.
void rewrite(const string& s) {
::lseek(fd_, 0, SEEK_SET);
::ftruncate(fd_, 0);
write(s);
}

Expand Down

0 comments on commit 58d0221

Please sign in to comment.