aboutsummaryrefslogtreecommitdiff
path: root/libbb/make_directory.c
diff options
context:
space:
mode:
authorJeremie Koenig <jk@jk.fr.eu.org>2010-05-27 15:46:33 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-07-19 00:46:28 +0200
commit84b01d5afc8230c79a1b8469c222d940c0d4e792 (patch)
tree0f1a7638e2138b60bdc6a48fc66ac66d415bdf32 /libbb/make_directory.c
parent816ed971e4ce60564f7ecbdc016d268d8e936230 (diff)
downloadbusybox-84b01d5afc8230c79a1b8469c222d940c0d4e792.tar.gz
mkdir: fix -p on FreeBSD
This patch is libbb.make_directory.diff from Debian kFreeBSD at: http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/make_directory.c')
-rw-r--r--libbb/make_directory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/make_directory.c b/libbb/make_directory.c
index 4486eb1ed..6dd04cf99 100644
--- a/libbb/make_directory.c
+++ b/libbb/make_directory.c
@@ -86,7 +86,7 @@ int FAST_FUNC bb_make_directory(char *path, long mode, int flags)
if (mkdir(path, 0777) < 0) {
/* If we failed for any other reason than the directory
* already exists, output a diagnostic and return -1 */
- if (errno != EEXIST
+ if ((errno != EEXIST && errno != EISDIR)
|| !(flags & FILEUTILS_RECUR)
|| ((stat(path, &st) < 0) || !S_ISDIR(st.st_mode))
) {