Skip to content

Commit ea8baba

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SharpExt4/ExtFileSystem.cpp

+1-1
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)