Skip to content

Commit ea8baba

Browse files
committed
Update ExtFileSystem.cpp
1 parent 12ab1d5 commit ea8baba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

SharpExt4/ExtFileSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Regex^ SharpExt4::ConvertWildcardsToRegEx(String^ pattern)
263263
pattern += ".";
264264
}
265265

266-
String^ query = "^" + pattern->Replace("\\*", ".*")->Replace("\\.", ".*") + "$";
266+
String^ query = "^" + Regex::Escape(pattern)->Replace("\\*", ".*")->Replace("\\.", ".*") + "$";
267267
return gcnew Regex(query, RegexOptions::IgnoreCase | RegexOptions::CultureInvariant);
268268
}
269269

0 commit comments

Comments
 (0)