diff options
author | cls%seawood.org <devnull@localhost> | 1998-08-19 20:42:01 +0000 |
---|---|---|
committer | cls%seawood.org <devnull@localhost> | 1998-08-19 20:42:01 +0000 |
commit | abe169192c1a36d36a462a044df505d5d0ad3eb6 (patch) | |
tree | 33ef23f7b0baaaca1cf87f329b4b895c17bfdf2a /config/nsinstall.c | |
parent | 41e22ad80dfa67fbcf0940f9c101111bb039dcf9 (diff) | |
download | nspr-hg-abe169192c1a36d36a462a044df505d5d0ad3eb6.tar.gz |
AUTOCONF_1_0 landing.PROGRESS_19980824_BASEColorSync_19980824_BASE
Diffstat (limited to 'config/nsinstall.c')
-rw-r--r-- | config/nsinstall.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/config/nsinstall.c b/config/nsinstall.c index 5090376b..f7e05bc9 100644 --- a/config/nsinstall.c +++ b/config/nsinstall.c @@ -24,6 +24,7 @@ #include <stdio.h> /* OSF/1 requires this before grp.h, so put it first */ #include <assert.h> #include <fcntl.h> +#include <errno.h> #include <grp.h> #include <pwd.h> #include <stdio.h> @@ -78,7 +79,8 @@ mkdirs(char *path, mode_t mode) { char *cp; struct stat sb; - + int res; + while (*path == '/' && path[1] == '/') path++; while ((cp = strrchr(path, '/')) && cp[1] == '\0') @@ -91,7 +93,11 @@ mkdirs(char *path, mode_t mode) } *cp = '/'; } - return mkdir(path, mode); + res = mkdir(path, mode); + if ((res != 0) && (errno == EEXIST)) + return 0; + else + return res; } static uid_t |