← Commit list

4298e87fa

Glenn L McGrath
Glenn L McGrath
2002-10-19
FAILED Duration: 6s

Subject

Dont try and make the "/" directory

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/make_directory.c+2 -2
@@ -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 = '/';