diff options
author | Glenn L McGrath | 2002-10-19 23:56:41 +0000 |
---|---|---|
committer | Glenn L McGrath | 2002-10-19 23:56:41 +0000 |
commit | 4298e87fa57e1f8b70c83678eba9988ae6d6fd95 (patch) | |
tree | 2ea6630ae1bc46c83184075accbd8e22decb8682 /libbb | |
parent | 61b7904afdf2fca21e4d6a4f70a73d1079f8f877 (diff) | |
download | busybox-4298e87fa57e1f8b70c83678eba9988ae6d6fd95.zip busybox-4298e87fa57e1f8b70c83678eba9988ae6d6fd95.tar.gz |
Dont try and make the "/" directory
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 3f81d9a..ca3eb49 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 = '/'; |