diff --git a/src/os/TempFile.hxx b/src/os/TempFile.hxx index ee3100836..0b9a30ac9 100644 --- a/src/os/TempFile.hxx +++ b/src/os/TempFile.hxx @@ -117,6 +117,7 @@ public: /// the data to write. void rewrite(const string& s) { ::lseek(fd_, 0, SEEK_SET); + ::ftruncate(fd_, 0); write(s); }