mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
When a directory cannot be read due to permission issues, the async version of fs.glob() returns null from readdir(), while the sync version returns an empty array. This causes a TypeError when trying to access the 'length' property of null. PR-URL: https://github.com/nodejs/node/pull/58674 Fixes: https://github.com/nodejs/node/issues/58670 Fixes: https://github.com/nodejs/node/issues/58276 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ethan-Arrowood <ethan@arrowood.dev> Reviewed-By: Juan José <soyjuanarbol@gmail.com>