* mkstemps.c (mkstemps): Keep looping even for EISDIR.

From-SVN: r138436
This commit is contained in:
Jakub Jelinek 2008-07-31 23:22:09 +02:00 committed by Jakub Jelinek
parent 1ea5e949d7
commit 60ecfb1bd0
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2008-07-31 Jakub Jelinek <jakub@redhat.com>
* mkstemps.c (mkstemps): Keep looping even for EISDIR.
2008-07-31 Denys Vlasenko <dvlasenk@redhat.com>
* mkstemps.c (mkstemps): If open failed with errno other than

View File

@ -127,7 +127,11 @@ mkstemps (char *pattern, int suffix_len)
if (fd >= 0)
/* The file does not exist. */
return fd;
if (errno != EEXIST)
if (errno != EEXIST
#ifdef EISDIR
&& errno != EISDIR
#endif
)
/* Fatal error (EPERM, ENOSPC etc). Doesn't make sense to loop. */
break;