From a8b167844d6d5982634e6f811a89c257bd36ba3f Mon Sep 17 00:00:00 2001 From: bug1 Date: Sun, 22 Sep 2002 02:12:30 +0000 Subject: Fix error messages conditions, and make them the same as GNU mkdir. git-svn-id: svn://busybox.net/trunk/busybox@5584 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- libbb/make_directory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libbb') 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); -- cgit v1.2.3-55-g6feb