From f9a74a2327f1a45e3da517e5c222b3e37464093d Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 25 Nov 2010 01:25:46 +0100 Subject: [PATCH] On windows, mkdir() doesn't take a mode parameter --- src/node_file.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node_file.cc b/src/node_file.cc index f17cbfa..04f3f31 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -518,7 +518,11 @@ static Handle MKDir(const Arguments& args) { if (args[2]->IsFunction()) { ASYNC_CALL(mkdir, args[2], *path, mode) } else { +#ifdef __MINGW32__ + int ret = mkdir(*path); +#else int ret = mkdir(*path, mode); +#endif if (ret != 0) return ThrowException(ErrnoException(errno, NULL, "", *path)); return Undefined(); } -- 2.7.4