Fix a bug introduced in rev.1.23 - for some reason mkdir("/", ...) system
call returns `EISDIR', not `EEXIST', so that be prepared for that. This should fix number of ports, that often call `mkdir -p //usr/local/foobar'. This is just a quick workaround, the real fix would be either to avoid calling mkdir("/", ...) or fix VFS code to return consistent errno for this case.
This commit is contained in:
parent
8b28692f71
commit
521f052069
@ -174,7 +174,7 @@ build(char *path, mode_t omode)
|
||||
if (last)
|
||||
(void)umask(oumask);
|
||||
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
|
||||
if (errno == EEXIST) {
|
||||
if (errno == EEXIST || errno == EISDIR) {
|
||||
if (stat(path, &sb) < 0) {
|
||||
warn("%s", path);
|
||||
retval = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user