aboutsummaryrefslogtreecommitdiff
path: root/libbb/make_directory.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/make_directory.c')
-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 1c3026ccc..2a2788b68 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);