aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-10-19 23:56:41 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-10-19 23:56:41 +0000
commit875fd5fae165c7e2a6f5724f89f7fcac7cb3cb1e (patch)
tree2ea6630ae1bc46c83184075accbd8e22decb8682 /libbb
parenta478d2c3f161934b1cf1e93e5a4bbdc4ffbea67d (diff)
downloadbusybox-w32-875fd5fae165c7e2a6f5724f89f7fcac7cb3cb1e.tar.gz
busybox-w32-875fd5fae165c7e2a6f5724f89f7fcac7cb3cb1e.tar.bz2
busybox-w32-875fd5fae165c7e2a6f5724f89f7fcac7cb3cb1e.zip
Dont try and make the "/" directory
git-svn-id: svn://busybox.net/trunk/busybox@5678 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r--libbb/make_directory.c4
1 files changed, 2 insertions, 2 deletions
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 @@
41int make_directory (char *path, long mode, int flags) 41int make_directory (char *path, long mode, int flags)
42{ 42{
43 int ret; 43 int ret;
44 44
45 /* Calling apps probably should use 0777 instead of -1 45 /* Calling apps probably should use 0777 instead of -1
46 * then we dont need this condition 46 * then we dont need this condition
47 */ 47 */
@@ -50,7 +50,7 @@ int make_directory (char *path, long mode, int flags)
50 } 50 }
51 if (flags == FILEUTILS_RECUR) { 51 if (flags == FILEUTILS_RECUR) {
52 char *pp = strrchr(path, '/'); 52 char *pp = strrchr(path, '/');
53 if (pp) { 53 if ((pp) && (pp != path)) {
54 *pp = '\0'; 54 *pp = '\0';
55 make_directory(path, mode, flags); 55 make_directory(path, mode, flags);
56 *pp = '/'; 56 *pp = '/';