mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Fix wrong error handling at Open() after open(2) in sync mode
This commit is contained in:
1 parent
1e6b72e8cb
commit
0c3a7c075e
1 file changed
+1
-1
+1
-1
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user