mirror of
https://git.busybox.net/busybox.git
synced 2024-12-18 18:03:29 +08:00
Dont return an error if the directory already existed
This commit is contained in:
parent
210aa14916
commit
193697db4e
@ -57,8 +57,12 @@ int make_directory (char *path, long mode, int flags)
|
||||
}
|
||||
}
|
||||
ret = mkdir(path, mode);
|
||||
if ( (ret == -1) && (errno != EEXIST) ) {
|
||||
if (ret == -1) {
|
||||
if (errno == EEXIST) {
|
||||
ret = 0;
|
||||
} else {
|
||||
perror_msg("Cannot create directory %s", path);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user