projects
/
platform
/
upstream
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61b7904
)
Dont try and make the "/" directory
author
Glenn L McGrath
<bug1@ihug.co.nz>
Sat, 19 Oct 2002 23:56:41 +0000
(23:56 -0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Sat, 19 Oct 2002 23:56:41 +0000
(23:56 -0000)
libbb/make_directory.c
patch
|
blob
|
history
diff --git
a/libbb/make_directory.c
b/libbb/make_directory.c
index
3f81d9a
..
ca3eb49
100644
(file)
--- 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 = '/';