From 31cc0388669af2bf588eb53ad7285df26f47649c Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 28 Sep 2015 03:08:33 -0700 Subject: [PATCH] Windows doesn't use the mode parameter on mkdir(). --- ldid.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.45.2