Skip to content

Commit

Permalink
fixup! fs: improve error performance for mkdirSync
Browse files Browse the repository at this point in the history
  • Loading branch information
CanadaHonk committed Sep 25, 2023
1 parent 948e91d commit 8ba6057
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ function mkdir(path, options, callback) {
* @returns {string | void}
*/
function mkdirSync(path, options) {
return syncFs.mkdirSync(path, options);
return syncFs.mkdir(path, options);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/fs/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function close(fd) {
return binding.closeSync(fd);
}

function mkdirSync(path, options) {
function mkdir(path, options) {
let mode = 0o777;
let recursive = false;
if (typeof options === 'number' || typeof options === 'string') {
Expand All @@ -113,5 +113,5 @@ module.exports = {
statfs,
open,
close,
mkdirSync,
mkdir,
};

0 comments on commit 8ba6057

Please sign in to comment.