Skip to content

Commit

Permalink
Use stat instead of lstat when checking CWD
Browse files Browse the repository at this point in the history
This allows CWD to be a symbolic link. Fixes isaacs#204
  • Loading branch information
stkb committed May 25, 2019
1 parent b863448 commit ac44077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mkdir.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const mkdir = module.exports = (dir, opt, cb) => {
return done()

if (dir === cwd)
return fs.lstat(dir, (er, st) => {
return fs.stat(dir, (er, st) => {
if (er || !st.isDirectory())
er = new CwdError(dir, er && er.code || 'ENOTDIR')
done(er)
Expand Down

0 comments on commit ac44077

Please sign in to comment.