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

Windows: mkdirs crashes / hangs with newline character #740

Closed
spoenemann opened this issue Jan 20, 2020 · 1 comment
Closed

Windows: mkdirs crashes / hangs with newline character #740

spoenemann opened this issue Jan 20, 2020 · 1 comment

Comments

@spoenemann
Copy link

This code never prints done!, but consumes lots of CPU (see #119):

const fs = require('fs-extra');
fs.mkdirs('foo\nbar').then(() => {
    console.log('done!');
});

This code

const fs = require('fs-extra');
fs.mkdirsSync('foo\nbar');
console.log('done!');

causes an error:

Error: EEXIST: file already exists, mkdir '...\fs-extra-bug'
    at Object.mkdirSync (fs.js:752:3)
    at mkdirsSync (...\fs-extra\lib\mkdirs\mkdirs-sync.js:31:9)
    at mkdirsSync (...\fs-extra\lib\mkdirs\mkdirs-sync.js:36:14)
    at mkdirsSync (...\fs-extra\lib\mkdirs\mkdirs-sync.js:37:7)
    at mkdirsSync (...\fs-extra\lib\mkdirs\mkdirs-sync.js:37:7)
    at mkdirsSync (...\fs-extra\lib\mkdirs\mkdirs-sync.js:37:7)
    at mkdirsSync (...\fs-extra\lib\mkdirs\mkdirs-sync.js:37:7)
    at mkdirsSync (...\fs-extra\lib\mkdirs\mkdirs-sync.js:37:7)
    at mkdirsSync (...\fs-extra\lib\mkdirs\mkdirs-sync.js:37:7)
    at mkdirsSync (...\fs-extra\lib\mkdirs\mkdirs-sync.js:37:7)
  • Operating System: Windows 10 build 18362.592
  • Node.js version: 10.15.3
  • fs-extra version: 8.1.0
@RyanZim
Copy link
Collaborator

RyanZim commented Jan 20, 2020

Dupe of #524.

@RyanZim RyanZim closed this as completed Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants