encode # symbol part of the path when creating uri

This commit is contained in:
Jeremy Wu 2020-08-31 07:39:05 +10:00
parent 104a00ef3b
commit b44b67220a

View file

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