diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2002-09-22 02:12:30 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2002-09-22 02:12:30 +0000 |
commit | b3f7261ffe93ec4de377992ff128e5bd520412be (patch) | |
tree | 5df5f569b6c13c0218bc47349ffc22f3deeb043c | |
parent | 3a1d8377ab4b17f110831d324cbd612b09fb40f8 (diff) | |
download | busybox-w32-b3f7261ffe93ec4de377992ff128e5bd520412be.tar.gz busybox-w32-b3f7261ffe93ec4de377992ff128e5bd520412be.tar.bz2 busybox-w32-b3f7261ffe93ec4de377992ff128e5bd520412be.zip |
Fix error messages conditions, and make them the same as GNU mkdir.
-rw-r--r-- | libbb/make_directory.c | 4 |
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) | |||
58 | } | 58 | } |
59 | ret = mkdir(path, mode); | 59 | ret = mkdir(path, mode); |
60 | if (ret == -1) { | 60 | if (ret == -1) { |
61 | if (errno == EEXIST) { | 61 | if ((flags == FILEUTILS_RECUR) && (errno == EEXIST)) { |
62 | ret = 0; | 62 | ret = 0; |
63 | } else { | 63 | } else { |
64 | perror_msg("Cannot create directory %s", path); | 64 | perror_msg("Cannot create directory '%s'", path); |
65 | } | 65 | } |
66 | } | 66 | } |
67 | return(ret); | 67 | return(ret); |