[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH 7/9] mkdir: fix -p on FreeBSD
From:       Jeremie Koenig <jk () jk ! fr ! eu ! org>
Date:       2010-07-28 21:03:16
Message-ID: 1280350998-24890-8-git-send-email-jk () jk ! fr ! eu ! org
[Download RAW message or body]

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>
---
 libbb/make_directory.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libbb/make_directory.c b/libbb/make_directory.c
index 4486eb1..6dd04cf 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))
 			) {
-- 
1.7.1

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic