mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-25 12:24:12 +08:00
(AddSelectionExec): use FileNameGlob class for matching.
This commit is contained in:
parent
05aa1568ea
commit
1bed5aeb83
@ -1132,8 +1132,7 @@ namespace GARbro.GUI
|
|||||||
CurrentDirectory.SelectAll();
|
CurrentDirectory.SelectAll();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var mask = Regex.Escape (selection.Mask.Text).Replace (@"\*", ".*").Replace (@"\?", ".");
|
var glob = new FileNameGlob (selection.Mask.Text);
|
||||||
var glob = new Regex ("^"+mask+"$", RegexOptions.IgnoreCase);
|
|
||||||
var matching = ViewModel.Where (entry => glob.IsMatch (entry.Name));
|
var matching = ViewModel.Where (entry => glob.IsMatch (entry.Name));
|
||||||
if (!matching.Any())
|
if (!matching.Any())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user