1
0
Fork 0

Bug fix/internal issue #572 (#9110)

* Added helper method to DataStore in iresearch link for performing full data store reset. Fixed usage of data store reset.

* Fixed checking directory creation status on windows
This commit is contained in:
Dronplane 2019-05-27 18:08:47 +03:00 committed by Andrey Abramov
parent 5da9fcb0ce
commit cce80f2553
1 changed files with 7 additions and 0 deletions

View File

@ -754,10 +754,17 @@ bool mkdir(const file_path_t path) NOEXCEPT {
std::basic_string<std::remove_pointer<file_path_t>::type> parent(parts.dirname);
if (!mkdir(parent.c_str())) {
#ifdef _WIN32
if (::GetLastError() != ERROR_ALREADY_EXISTS) {
// failed to create parent
return false;
}
#else
if (errno != EEXIST) {
// failed to create parent
return false;
}
#endif
}
}