projects
/
oweals
/
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 3f81d9ac2ba9d1eb87bb00bfb8603ef53014ebae..ca3eb495c859f676d640cb9f5b823c17a3637536 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 = '/';