use StringComparison.OrdinalIgnoreCase when calling String.Replace

This commit is contained in:
Jeremy Wu 2020-09-01 07:52:42 +10:00
parent afb61b247b
commit 6dd7259fcc

View file

@ -52,7 +52,9 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
if (dataReaderResults.GetValue(0) != DBNull.Value && dataReaderResults.GetValue(1) != DBNull.Value)
{
// # is URI syntax for the fragment component, need to be encoded so LocalPath returns complete path
var encodedFragmentPath = dataReaderResults.GetString(1).Replace("#", "%23");
var encodedFragmentPath = dataReaderResults
.GetString(1)
.Replace("#", "%23", StringComparison.OrdinalIgnoreCase);
var path = new Uri(encodedFragmentPath).LocalPath;