We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is an error in case of using relative paths: search with caseSensitive: true returns more results then caseSensitive: false.
caseSensitive: true
caseSensitive: false
Here is an example. Consider the following directories:
. ├── dir1 │ └── file1.txt └── dir2 └── file2.txt
Run the following program from the dir1:
dir1
import 'package:glob/glob.dart'; import 'package:glob/list_local_fs.dart'; void main(List<String> arguments) { print('1: ${Glob('**.txt', caseSensitive: null).listSync()}'); print('2: ${Glob('**.txt', caseSensitive: false).listSync()}'); print('3: ${Glob('**.txt', caseSensitive: true).listSync()}'); print('4: ${Glob('../dir2/**.txt', caseSensitive: null).listSync()}'); print('5: ${Glob('../dir2/**.txt', caseSensitive: false).listSync()}'); print('6: ${Glob('../dir2/**.txt', caseSensitive: true).listSync()}'); print('7: ${Glob('..\\dir2\\**.txt', caseSensitive: null).listSync()}'); print('8: ${Glob('..\\dir2\\**.txt', caseSensitive: false).listSync()}'); print('9: ${Glob('..\\dir2\\**.txt', caseSensitive: true).listSync()}'); }
Output on Linux:
1: [LocalFile: './file1.txt'] 2: [LocalFile: './file1.txt'] 3: [LocalFile: './file1.txt'] 4: [LocalFile: './../dir2/file2.txt'] 5: [] 6: [LocalFile: './../dir2/file2.txt'] 7: [] 8: [] 9: []
Output on Windows:
1: [LocalFile: '.\file1.txt'] 2: [LocalFile: '.\file1.txt'] 3: [LocalFile: '.\file1.txt'] 4: [] 5: [] 6: [LocalFile: '.\..\dir2\file2.txt'] 7: [] 8: [] 9: []
4 is OK, because caseSensitive defaults to false when context is Windows and true otherwise.
caseSensitive
false
true
The real problem is that more strict condition caseSensitive: true (6) produces more then caseSensitive: false (5).
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There is an error in case of using relative paths: search with
caseSensitive: true
returns more results thencaseSensitive: false
.Here is an example. Consider the following directories:
Run the following program from the
dir1
:Output on Linux:
Output on Windows:
4 is OK, because
caseSensitive
defaults tofalse
when context is Windows andtrue
otherwise.The real problem is that more strict condition
caseSensitive: true
(6) produces more thencaseSensitive: false
(5).The text was updated successfully, but these errors were encountered: