write_sha1_from_fd() should make new objects read-only

... like it is done everywhere else.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Nicolas Pitre 2007-03-24 12:02:27 -04:00 committed by Junio C Hamano
parent 0e55181f29
commit b5b8d8141a

View File

@ -2154,6 +2154,7 @@ int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,
} while (1);
inflateEnd(&stream);
fchmod(local, 0444);
close(local);
SHA1_Final(real_sha1, &c);
if (ret != Z_STREAM_END) {