-
-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix nocase matching on case-sensitive filesystems
If the platform indicates that the filesystem is likely case-sensitive (ie, not darwin or win32), and nocase:true is set, we can't know if that's indicating that the filesystem _itself_ is case-insensitive, or if the user simply wants to perform case-insensitive matching. In the case where it is in fact likely case-sensitive, and `nocase:true` is set, do _not_ set `nocaseMagicOnly`, because filesystem operations will not be run case-insensitively. Fix: #526
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import t from 'tap' | ||
import { Glob } from '../dist/cjs/src/index.js' | ||
|
||
const darwin = new Glob('x', { nocase: true, platform: 'darwin' }) | ||
const linux = new Glob('x', { nocase: true, platform: 'linux' }) | ||
|
||
t.type(darwin.patterns[0].pattern(), 'string') | ||
t.type(linux.patterns[0].pattern(), RegExp) |