summaryrefslogtreecommitdiff
path: root/zic.c
diff options
context:
space:
mode:
Diffstat (limited to 'zic.c')
-rw-r--r--zic.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/zic.c b/zic.c
index a29f679..ff04793 100644
--- a/zic.c
+++ b/zic.c
@@ -3670,9 +3670,14 @@ mkdirs(char const *argname, bool ancestors)
some other process might have made the directory
in the meantime. Likewise for ENOSYS, because
Solaris 10 mkdir fails with ENOSYS if the
- directory is an automounted mount point. */
+ directory is an automounted mount point.
+ Likewise for EACCES, since mkdir can fail
+ with EACCES merely because the parent directory
+ is unwritable. Likewise for most other error
+ numbers. */
int err = errno;
- if (err != EEXIST && err != ENOSYS) {
+ if (err == ELOOP || err == ENAMETOOLONG
+ || err == ENOENT || err == ENOTDIR) {
error(_("%s: Can't create directory %s: %s"),
progname, name, strerror(err));
exit(EXIT_FAILURE);