From 1bed5aeb83263fe9d706cb0940a0b304fab5b263 Mon Sep 17 00:00:00 2001 From: morkt Date: Sun, 6 Mar 2016 15:18:22 +0400 Subject: [PATCH] (AddSelectionExec): use FileNameGlob class for matching. --- GUI/MainWindow.xaml.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/GUI/MainWindow.xaml.cs b/GUI/MainWindow.xaml.cs index 6ce175cf..3c1e4187 100644 --- a/GUI/MainWindow.xaml.cs +++ b/GUI/MainWindow.xaml.cs @@ -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()) {