Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs:fs.mkdir() the process does not exit when recursive is set to true in some case #28241

Closed
changk99 opened this issue Jun 15, 2019 · 1 comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. fs Issues and PRs related to the fs subsystem / file system. windows Issues and PRs related to the Windows platform.

Comments

@changk99
Copy link

changk99 commented Jun 15, 2019

  • Version: v10.15.0
  • Platform: win10
  • Subsystem: x64 win32
    create a new file and set the file name 'test'
    the index.js is same level
// index.js
const fs = require('fs')

fs.mkdir('./test', {
  recursive: true
}, (err) => {
  console.log(err) // [Error: EEXIST: file already exists]
})

this will trigger the error

const fs = require('fs')

fs.mkdir('./test/a', {
  recursive: true
}, (err) => {
  console.log(err) 
})

this will not trigger the error and the process does not exit

if test is a directory is no problem, but if test is a file and recursive is true, the process does not exit and keep waiting and not trigger error

@richardlau
Copy link
Member

Duplicate of #27198. This was fixed by #27207 which was included in Node.js 10.16.0.

@richardlau richardlau added duplicate Issues and PRs that are duplicates of other issues or PRs. fs Issues and PRs related to the fs subsystem / file system. windows Issues and PRs related to the Windows platform. labels Jun 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. fs Issues and PRs related to the fs subsystem / file system. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

2 participants