Re: Problem pushing to a Novell share
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 3, 2012, 01:28 UTC
- Message-ID
- <7vfwesu2ma.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CAJ4nRM1K=sCy8_0PG-NADVn4T0XG1ELC7AvtQyW-Dc1cUMzEXQ@mail.gmail.com>
Rüdiger Kessel <ruediger.kessel@gmail.com> 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?