summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 65117ab)
raw | patch | inline | side by side (parent: 65117ab)
author | Sam Vilain <sam@vilain.net> | |
Fri, 14 Nov 2008 07:19:34 +0000 (20:19 +1300) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 28 Nov 2008 03:11:21 +0000 (19:11 -0800) |
An earlier commit 916d081 (Nicer error messages in case saving an object
to db goes wrong, 2006-11-09) confused EACCES with EPERM, the latter of
which is an unlikely error from mkstemp().
Signed-off-by: Sam Vilain <sam@vilain.net>
to db goes wrong, 2006-11-09) confused EACCES with EPERM, the latter of
which is an unlikely error from mkstemp().
Signed-off-by: Sam Vilain <sam@vilain.net>
sha1_file.c | patch | blob | history |
diff --git a/sha1_file.c b/sha1_file.c
index 1d7f3b6ce8b2cac3056ade6476fb239351b22cc6..4e05429aba880a5d6672cf3fc2033e872798e970 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2246,7 +2246,7 @@ static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen,
filename = sha1_file_name(sha1);
fd = create_tmpfile(tmpfile, sizeof(tmpfile), filename);
if (fd < 0) {
- if (errno == EPERM)
+ if (errno == EACCES)
return error("insufficient permission for adding an object to repository database %s\n", get_object_directory());
else
return error("unable to create temporary sha1 filename %s: %s\n", tmpfile, strerror(errno));