Re: [PATCH] sha1_file: make sure correct error is propagated

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] sha1_file: make sure correct error is propagated

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:39

Francis Galiegue [off-list ref] writes:
Le Friday 14 November 2008 20:05:19 Junio C Hamano, vous avez écrit :
[...]
quoted
quoted
 	fd = mkstemp(buffer);
-	if (fd < 0 && dirlen && (errno != EPERM)) {
+	if (fd < 0 && dirlen && (errno != EACCESS)) {
Is this accepting the two as equivalents???
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Well, looking at mkdir(2), it says:

       EPERM  The file system containing pathname does not support the 
creation of directories.

Hmm, err... git would fail at an earlier point anyway, wouldn't it? Even git 
init would fail there.
Actually, POSIX does not even talk about EPERM for mkdir(2), but that was
not my point.  The code does something different from what the proposed
commit log message talks about.  That was what bothered me.

Re: [PATCH] sha1_file: make sure correct error is propagated

From: Sam Vilain <hidden>
Date: 2016-06-15 22:45:39

On Fri, 2008-11-14 at 21:44 -0800, Junio C Hamano wrote:
Actually, POSIX does not even talk about EPERM for mkdir(2), but that was
not my point.  The code does something different from what the proposed
commit log message talks about.  That was what bothered me.
My wording was a little terse and confusing.  Here's a new one;

Subject: sha1_file.c: resolve confusion EACCESS vs EPERM

EPERM or 'Operation not permitted' is an unlikely error from
mkstemp(); test for EACCESS 'Access Denied' instead.  Make the
special branch which prints the error to the user nicely also
understand EACCESS.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help