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

This commit is contained in:
avz authored and Ben Noordhuis committed 2011-07-05 02:05:37 +02:00
1 parent 1e6b72e8cb
commit 0c3a7c075e
1 file changed
+1 -1
+1 -1
View File
@@ -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));
}
}