← Commit list

84b01d5af

Jeremie Koenig
Jeremie Koenig
2010-07-19
FAILED Duration: 52s

Subject

mkdir: fix -p on FreeBSD

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+1 -1
@@ -86,7 +86,7 @@ int FAST_FUNC bb_make_directory(char *path, long mode, int flags)
if (mkdir(path, 0777) < 0) {
/* If we failed for any other reason than the directory
* already exists, output a diagnostic and return -1 */
- if (errno != EEXIST
+ if ((errno != EEXIST && errno != EISDIR)
|| !(flags & FILEUTILS_RECUR)
|| ((stat(path, &st) < 0) || !S_ISDIR(st.st_mode))
) {