summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath2002-09-22 02:12:30 +0000
committerGlenn L McGrath2002-09-22 02:12:30 +0000
commitb3f7261ffe93ec4de377992ff128e5bd520412be (patch)
tree5df5f569b6c13c0218bc47349ffc22f3deeb043c
parent3a1d8377ab4b17f110831d324cbd612b09fb40f8 (diff)
downloadbusybox-b3f7261ffe93ec4de377992ff128e5bd520412be.zip
busybox-b3f7261ffe93ec4de377992ff128e5bd520412be.tar.gz
Fix error messages conditions, and make them the same as GNU mkdir.
-rw-r--r--libbb/make_directory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/make_directory.c b/libbb/make_directory.c
index 1c3026c..2a2788b 100644
--- a/libbb/make_directory.c
+++ b/libbb/make_directory.c
@@ -58,10 +58,10 @@ int make_directory (char *path, long mode, int flags)
}
ret = mkdir(path, mode);
if (ret == -1) {
- if (errno == EEXIST) {
+ if ((flags == FILEUTILS_RECUR) && (errno == EEXIST)) {
ret = 0;
} else {
- perror_msg("Cannot create directory %s", path);
+ perror_msg("Cannot create directory '%s'", path);
}
}
return(ret);