Skip to content

Commit 8ba6057

Browse files
committed
fixup! fs: improve error performance for mkdirSync
1 parent 948e91d commit 8ba6057

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/fs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ function mkdir(path, options, callback) {
13611361
* @returns {string | void}
13621362
*/
13631363
function mkdirSync(path, options) {
1364-
return syncFs.mkdirSync(path, options);
1364+
return syncFs.mkdir(path, options);
13651365
}
13661366

13671367
/**

lib/internal/fs/sync.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function close(fd) {
8686
return binding.closeSync(fd);
8787
}
8888

89-
function mkdirSync(path, options) {
89+
function mkdir(path, options) {
9090
let mode = 0o777;
9191
let recursive = false;
9292
if (typeof options === 'number' || typeof options === 'string') {
@@ -113,5 +113,5 @@ module.exports = {
113113
statfs,
114114
open,
115115
close,
116-
mkdirSync,
116+
mkdir,
117117
};

0 commit comments

Comments
 (0)