diff --git a/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.cpp b/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.cpp index e41aec5b5a1..60296fa5ff9 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.cpp @@ -146,7 +146,8 @@ bool FileSystem::createDirectory(const std::string& path) return true; } #else - if (mkdir(path.c_str(), 0755)) + int status = mkdir(path.c_str(), 0755); + if (status && status != EEXIST) { msg_error(error) << path << ": " << strerror(errno); return true;