summaryrefslogtreecommitdiff
path: root/config/nsinstall.c
diff options
context:
space:
mode:
authorcls%seawood.org <devnull@localhost>1998-08-19 20:42:01 +0000
committercls%seawood.org <devnull@localhost>1998-08-19 20:42:01 +0000
commitabe169192c1a36d36a462a044df505d5d0ad3eb6 (patch)
tree33ef23f7b0baaaca1cf87f329b4b895c17bfdf2a /config/nsinstall.c
parent41e22ad80dfa67fbcf0940f9c101111bb039dcf9 (diff)
downloadnspr-hg-abe169192c1a36d36a462a044df505d5d0ad3eb6.tar.gz
Diffstat (limited to 'config/nsinstall.c')
-rw-r--r--config/nsinstall.c10
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