1
0
Fork 0

recheck if mkdir fails

This commit is contained in:
Frank Celler 2019-04-21 14:02:14 +02:00
parent ed83084d5a
commit 6abda70550
1 changed files with 5 additions and 1 deletions

View File

@ -801,6 +801,10 @@ bool mkdir(const file_path_t path) NOEXCEPT {
}
#else
if (0 != ::mkdir(path, S_IRWXU|S_IRWXG|S_IRWXO)) {
if (errno == EEXIST && exists_directory(result, path) && result) {
return true;
}
IR_FRMT_ERROR("Failed to create path: '%s', error %d", path, errno);
return false;
@ -1145,4 +1149,4 @@ NS_END // ROOT
// -----------------------------------------------------------------------------
// --SECTION-- END-OF-FILE
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------