diff options
author | cls%seawood.org <devnull@localhost> | 1998-09-27 00:02:21 +0000 |
---|---|---|
committer | cls%seawood.org <devnull@localhost> | 1998-09-27 00:02:21 +0000 |
commit | 97a679c8093935400826a37c4baa1ff50e82c83c (patch) | |
tree | 988e61d2f46d4920e9d5a385fcc0a9f3a9c6074d | |
parent | a940dada0ecfa9a060941cf77ae7f33dfc32ec62 (diff) | |
download | nspr-hg-97a679c8093935400826a37c4baa1ff50e82c83c.tar.gz |
Makes nsinstall not return an error if an intermediate directory already exists.
-rw-r--r-- | config/nsinstall.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/config/nsinstall.c b/config/nsinstall.c index 8e48b357..c3a3bba8 100644 --- a/config/nsinstall.c +++ b/config/nsinstall.c @@ -84,6 +84,7 @@ mkdirs(char *path, mode_t mode) { char *cp; struct stat sb; + int res; while (*path == '/' && path[1] == '/') path++; @@ -97,7 +98,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 |