From 5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 Mon Sep 17 00:00:00 2001 From: svn2git Date: Fri, 1 Jul 1994 00:00:00 -0800 Subject: Release FreeBSD 1.1.5.1 This commit was manufactured to restore the state of the 1.1.5.1-RELEASE image. Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs. --- gnu/libexec/uucp/libunix/mkdirs.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'gnu/libexec/uucp/libunix/mkdirs.c') diff --git a/gnu/libexec/uucp/libunix/mkdirs.c b/gnu/libexec/uucp/libunix/mkdirs.c index a4e0b67bb8c3..9b5b23ffd7b1 100644 --- a/gnu/libexec/uucp/libunix/mkdirs.c +++ b/gnu/libexec/uucp/libunix/mkdirs.c @@ -29,17 +29,19 @@ fsysdep_make_dirs (zfile, fpublic) if (*z == '/' && z != zcopy) { *z = '\0'; - if (! fsysdep_directory (zcopy)) + if (mkdir (zcopy, imode) != 0 + && errno != EEXIST + && (errno != EACCES || ! fsysdep_directory (zcopy))) { - if (mkdir (zcopy, imode) != 0) - { - ulog (LOG_ERROR, "mkdir (%s): %s", zcopy, - strerror (errno)); - ubuffree (zcopy); - return FALSE; - } + ulog (LOG_ERROR, "mkdir (%s): %s", zcopy, + strerror (errno)); + ubuffree (zcopy); + return FALSE; } - *z = '/'; + *z = '/'; /* replace '/' in its place */ + /* now skips over multiple '/' in name */ + while ( (*(z + 1)) && (*(z + 1)) == '/') + z++; } } -- cgit v1.2.3