You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
missing error.path at fs.mkdir callback on last call #28015
>node index2.js
Error: ENOTDIR: not a directory, mkdir './foo/foo/foo'
at Object.mkdirSync (fs.js:748:3)
at Object.<anonymous> (C:\Users\himself65\Desktop\Github\test\index2.js:4:6)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
at internal/main/run_main_module.js:17:11 {
errno: -4052,
syscall: 'mkdir',
code: 'ENOTDIR',
path: './foo/foo/foo'
}
./foo/foo/foo
[Error: ENOTDIR: not a directory, mkdir] {
errno: -4052,
code: 'ENOTDIR',
syscall: 'mkdir'
}
undefined
changed the title [-]mkdir error is missing error.path (only with recursive: true)[/-][+]missing error.path at fs.mkdir callback on last call[/+]on Jun 3, 2019
Activity
Trott commentedon Jun 2, 2019
/ping @bcoe
himself65 commentedon Jun 2, 2019
fs.writeFileSync('./test2.txt', '');is the culprithimself65 commentedon Jun 2, 2019
v12.3.0himself65 commentedon Jun 2, 2019
In the
Unixplatform, we cannot create the file and folder which are the same name, because everything is a file inUnix.what's more, if we really create it, what's the happened in this example?
In the
Windowsplatform, I think it's the same reasonhimself65 commentedon Jun 2, 2019
node/src/node_file.cc
Line 1402 in e8f3119
and when make dir loop call
MKDirpAsynchimself65 commentedon Jun 2, 2019
thisconnect commentedon Jun 2, 2019
correct, but the issue is only about that path is missing in this error. I update the description. Sorry I should have written a better description.
himself65 commentedon Jun 2, 2019
i get it. and I believe something escaped this line
node/src/node_file.cc
Line 1402 in e8f3119
himself65 commentedon Jun 3, 2019
I think the actual bug is a missing path on last call
himself65 commentedon Jun 3, 2019
so, this issue title should change to missing error.path at
fs.mkdircallback on last call[-]mkdir error is missing error.path (only with recursive: true)[/-][+]missing error.path at fs.mkdir callback on last call[/+]fs: set path when mkdir recursive called on file
fs: set path when mkdir recursive called on file
fs: set path when mkdir recursive called on file
fs: set path when mkdir recursive called on file
fs: set path when mkdir recursive called on file