Skip to content

Commit a25ca34

Browse files
committed
fixup! fs: improve error performance for mkdirSync
1 parent 849c711 commit a25ca34

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/fs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,7 @@ function mkdir(path, options, callback) {
13591359
* @returns {string | void}
13601360
*/
13611361
function mkdirSync(path, options) {
1362-
return syncFs.mkdirSync(path, options);
1362+
return syncFs.mkdir(path, options);
13631363
}
13641364

13651365
/**

lib/internal/fs/sync.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function close(fd) {
8888
return binding.closeSync(fd);
8989
}
9090

91-
function mkdirSync(path, options) {
91+
function mkdir(path, options) {
9292
let mode = 0o777;
9393
let recursive = false;
9494
if (typeof options === 'number' || typeof options === 'string') {
@@ -115,5 +115,5 @@ module.exports = {
115115
statfs,
116116
open,
117117
close,
118-
mkdirSync,
118+
mkdir,
119119
};

0 commit comments

Comments
 (0)