diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-09-22 02:12:30 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-09-22 02:12:30 +0000 |
commit | a8b167844d6d5982634e6f811a89c257bd36ba3f (patch) | |
tree | 5df5f569b6c13c0218bc47349ffc22f3deeb043c /libbb | |
parent | 793a2f4b299402bca660ad9a5e36f7b51a5c8845 (diff) | |
download | busybox-w32-a8b167844d6d5982634e6f811a89c257bd36ba3f.tar.gz busybox-w32-a8b167844d6d5982634e6f811a89c257bd36ba3f.tar.bz2 busybox-w32-a8b167844d6d5982634e6f811a89c257bd36ba3f.zip |
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
Diffstat (limited to 'libbb')
-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); |