Browse Source

On windows, mkdir() doesn't take a mode parameter

v0.7.4-release
Bert Belder 14 years ago
parent
commit
f9a74a2327
  1. 4
      src/node_file.cc

4
src/node_file.cc

@ -518,7 +518,11 @@ static Handle<Value> MKDir(const Arguments& args) {
if (args[2]->IsFunction()) { if (args[2]->IsFunction()) {
ASYNC_CALL(mkdir, args[2], *path, mode) ASYNC_CALL(mkdir, args[2], *path, mode)
} else { } else {
#ifdef __MINGW32__
int ret = mkdir(*path);
#else
int ret = mkdir(*path, mode); int ret = mkdir(*path, mode);
#endif
if (ret != 0) return ThrowException(ErrnoException(errno, NULL, "", *path)); if (ret != 0) return ThrowException(ErrnoException(errno, NULL, "", *path));
return Undefined(); return Undefined();
} }

Loading…
Cancel
Save