diff --git a/src/common/pathTools.cpp b/src/common/pathTools.cpp index 19d618d14..f1ca7d222 100644 --- a/src/common/pathTools.cpp +++ b/src/common/pathTools.cpp @@ -105,7 +105,11 @@ bool fileExists(const string &path) { } bool makeDirectory(const string &path) { +#ifdef _WIN32 + int status = _mkdir(path.c_str()); +#else int status = mkdir(path.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); +#endif return status == 0; } diff --git a/src/common/pathTools.h b/src/common/pathTools.h index f87155a77..55fa3f58b 100644 --- a/src/common/pathTools.h +++ b/src/common/pathTools.h @@ -30,6 +30,10 @@ #include #include +#ifdef _WIN32 +#include +#endif + using namespace std; bool isRelativePath(const string &path);