Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ function open(path, flags, mode, callback) {
callback = flags;
flags = 'r';
mode = 0o666;
} else if (arguments.length === 3) {
} else if (typeof mode === 'function') {
callback = mode;
mode = 0o666;
}
Expand Down Expand Up @@ -808,7 +808,7 @@ function readdirSync(path, options) {
}

function fstat(fd, options, callback) {
if (arguments.length < 3) {
if (typeof options === 'function') {
callback = options;
options = {};
}
Expand All @@ -819,7 +819,7 @@ function fstat(fd, options, callback) {
}

function lstat(path, options, callback) {
if (arguments.length < 3) {
if (typeof options === 'function') {
callback = options;
options = {};
}
Expand All @@ -832,7 +832,7 @@ function lstat(path, options, callback) {
}

function stat(path, options, callback) {
if (arguments.length < 3) {
if (typeof options === 'function') {
callback = options;
options = {};
}
Expand Down