X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=unpack-file.c;h=d24acc2a67c4b7ba112bd192680b137f30a06003;hb=7943b3a94f0f862dc9d7dcec6b5639ae5bf027bd;hp=ccddf1d4b0cf7fd3a699d8b33cf5bc4c5c4435b7;hpb=143f4d94c6e2188a6bedfdfa268e66b579e3fbf9;p=git.git diff --git a/unpack-file.c b/unpack-file.c index ccddf1d4b..d24acc2a6 100644 --- a/unpack-file.c +++ b/unpack-file.c @@ -17,7 +17,7 @@ static char *create_temp_file(unsigned char *sha1) fd = mkstemp(path); if (fd < 0) die("unable to create temp-file"); - if (write(fd, buf, size) != size) + if (write_in_full(fd, buf, size) != size) die("unable to write temp-file"); close(fd); return path;