From: Jay Freeman (saurik) Date: Mon, 28 Sep 2015 10:08:33 +0000 (-0700) Subject: Windows doesn't use the mode parameter on mkdir(). X-Git-Tag: v2.1.0~76 X-Git-Url: https://git.saurik.com/ldid.git/commitdiff_plain/31cc0388669af2bf588eb53ad7285df26f47649c Windows doesn't use the mode parameter on mkdir(). --- 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;