From 875fd5fae165c7e2a6f5724f89f7fcac7cb3cb1e Mon Sep 17 00:00:00 2001 From: bug1 Date: Sat, 19 Oct 2002 23:56:41 +0000 Subject: Dont try and make the "/" directory git-svn-id: svn://busybox.net/trunk/busybox@5678 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 3f81d9ac2..ca3eb495c 100644 --- a/libbb/make_directory.c +++ b/libbb/make_directory.c @@ -41,7 +41,7 @@ int make_directory (char *path, long mode, int flags) { int ret; - + /* Calling apps probably should use 0777 instead of -1 * then we dont need this condition */ @@ -50,7 +50,7 @@ int make_directory (char *path, long mode, int flags) } if (flags == FILEUTILS_RECUR) { char *pp = strrchr(path, '/'); - if (pp) { + if ((pp) && (pp != path)) { *pp = '\0'; make_directory(path, mode, flags); *pp = '/'; -- cgit v1.2.3-55-g6feb