mkdir no ERROR when parent is a file with native recursive option · Issue #27198 · nodejs/node (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@thisconnect

Description

@thisconnect

On windows Node.js v10.x hangs when trying to mkdir in a path where the parent is a file.
(sorry tested only on appveyor and travis)

Node8 on windows errors with EEXIST
Node10 on non-windows errors ENOTDIR
Node10 on windows hangs NO error 😿

const fs = require('fs') fs.writeFileSync('./test2.txt', '') fs.mkdirSync('./test2.txt/sub/dir', { recursive: true })

See hanging test on travis https://travis-ci.org/sindresorhus/make-dir
Related PR that adds test to make-dir sindresorhus/make-dir#15