X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=tempfile.c;h=d43ad8c1912d977183270fabe7ac76c5bbb7a1a3;hb=dda634687717fd8aafd54cae9ae3d9b2902e276e;hp=139ecd97f8eb88b597aab50c2eb2b171a11ef3ef;hpb=06994ae06506a24dfdad0336a555bbdcfaa693e2;p=thirdparty%2Fgit.git diff --git a/tempfile.c b/tempfile.c index 139ecd97f8..d43ad8c191 100644 --- a/tempfile.c +++ b/tempfile.c @@ -279,7 +279,7 @@ int reopen_tempfile(struct tempfile *tempfile) BUG("reopen_tempfile called for an inactive object"); if (0 <= tempfile->fd) BUG("reopen_tempfile called for an open object"); - tempfile->fd = open(tempfile->filename.buf, O_WRONLY); + tempfile->fd = open(tempfile->filename.buf, O_WRONLY|O_TRUNC); return tempfile->fd; }