mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +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();
|
||||
return;
|
||||
}
|
||||
var mask = Regex.Escape (selection.Mask.Text).Replace (@"\*", ".*").Replace (@"\?", ".");
|
||||
var glob = new Regex ("^"+mask+"$", RegexOptions.IgnoreCase);
|
||||
var glob = new FileNameGlob (selection.Mask.Text);
|
||||
var matching = ViewModel.Where (entry => glob.IsMatch (entry.Name));
|
||||
if (!matching.Any())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user