summaryrefslogtreecommitdiffstats
path: root/ldid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ldid.cpp')
-rw-r--r--ldid.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ldid.cpp b/ldid.cpp
index 68fdf7d..9aff853 100644
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -1387,8 +1387,13 @@ class Split {
static void mkdir_p(const std::string &path) {
if (path.empty())
return;
+#ifdef __WIN32__
+ if (_syscall(mkdir(path.c_str()), EEXIST) == -EEXIST)
+ return;
+#else
if (_syscall(mkdir(path.c_str(), 0755), EEXIST) == -EEXIST)
return;
+#endif
auto slash(path.rfind('/', path.size() - 1));
if (slash == std::string::npos)
return;