Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Problem pushing to a Novell share

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:55

Rüdiger Kessel [off-list ref] writes:
Trying git_mkstemp_mode() first means trying more 16000 times to create a
random file before realizing that something might be wrong.
Well, git_mkstemps_mode() does have such a 16k loop, and it tries to
create a unique, unused file this way:

		fd = open(pattern, O_CREAT | O_EXCL | O_RDWR, mode);
		if (fd > 0)
			return fd;
		/*
		 * Fatal error (EPERM, ENOSPC etc).
		 * It doesn't make sense to loop.
		 */
		if (errno != EEXIST)
			break;

If you do not have a directory D and try to create D/tmp_random here,
shouldn't you get an error that is _NOT_ EEXIST and trigger this break?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help