Browse Source

Fix wrong error handling at Open() after open(2) in sync mode

v0.7.4-release
avz 14 years ago
committed by Ben Noordhuis
parent
commit
0c3a7c075e
  1. 2
      src/node_file.cc

2
src/node_file.cc

@ -664,8 +664,8 @@ static Handle<Value> Open(const Arguments& args) {
ASYNC_CALL(open, args[3], *path, flags, mode)
} else {
int fd = open(*path, flags, mode);
SetCloseOnExec(fd);
if (fd < 0) return ThrowException(ErrnoException(errno, NULL, "", *path));
SetCloseOnExec(fd);
return scope.Close(Integer::New(fd));
}
}

Loading…
Cancel
Save