fs: apply nocase to literal glob exclude patterns · nodejs/node@bc431c8 · GitHub
Skip to content

Commit bc431c8

Browse files
yhay81aduh95
authored andcommitted
fs: apply nocase to literal glob exclude patterns
On case-insensitive platforms include patterns match entries regardless of case, but literal (non-magic) exclude patterns were matched case-sensitively because exclude matchers are created with nocaseMagicOnly. Exclusion is a pure string match with no filesystem lookups, so disable nocaseMagicOnly for exclude matchers. Fixes: #58991 Refs: #63446 Signed-off-by: Yusuke Hayashi <yusuke8h@gmail.com> PR-URL: #64817 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent b7b18fd commit bc431c8

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

‎lib/internal/fs/glob.js‎

Lines changed: 4 additions & 1 deletion

‎test/parallel/test-fs-glob.mjs‎

Lines changed: 28 additions & 0 deletions

0 commit comments

Comments
 (0)