If we get EACCES from mkdir, try to stat() it, and if it is ok, we keep going.
Fixes problem with IRIX.
This commit is contained in:
parent
1839ea54c0
commit
d0d28f16f5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ar_subs.c,v 1.45 2005/11/01 23:43:27 christos Exp $ */
|
||||
/* $NetBSD: ar_subs.c,v 1.46 2005/12/06 19:11:15 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992 Keith Muller.
|
||||
|
@ -42,7 +42,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)ar_subs.c 8.2 (Berkeley) 4/18/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: ar_subs.c,v 1.45 2005/11/01 23:43:27 christos Exp $");
|
||||
__RCSID("$NetBSD: ar_subs.c,v 1.46 2005/12/06 19:11:15 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -141,6 +141,7 @@ domkdir(const char *fname, mode_t mode)
|
|||
case EISDIR:
|
||||
return 0;
|
||||
case EEXIST:
|
||||
case EACCES:
|
||||
error = errno;
|
||||
if (stat(fname, &sb) != -1 && S_ISDIR(sb.st_mode))
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue