Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Description
- Version: 10.16.0, 11.14.0, 12.6.0
- Platform: Windows 10
- Subsystem: fs
If the name of the dir to be created is invalid, fs.mkdir never calls back and fs.mkdirSync blocks:
const fs = require('fs') console.log("1") fs.mkdir('invalid1:',{recursive: true}, (err) =>{console.log("is not called") if (err) throw err }) console.log("2") fs.mkdirSync('invalid2:',{recursive: true}) console.log("is not reached") BTW, the error message that is reported with{recursive: false} appears a bit strange:
Error: ENOENT: no such file or directory, mkdir 'invalid2:'
Wouldn't it be more convenient to use EPERM, EACCES or ENOTDIR?
mgreenw
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.