{{ message }}
Commit bacba16
fs: fix ENOTDIR in globSync when file is treated as dir
`fs.globSync` failed with `ENOTDIR` when a path component in a glob
pattern was a file but used as a directory (e.g., 'foo{,/bar}' when
'foo' is a file).
This change aligns `getDirentSync` with the asynchronous `getDirent`
by wrapping the `lstatSync` call in a `try-catch` block to safely
return `null` on such errors.
Fixes: #61257
PR-URL: #61259
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>1 parent 2423ecd commit bacba16
2 files changed
Lines changed: 23 additions & 3 deletions

0 commit comments