Skip to content

Commit b44b672

Browse files
committed
encode # symbol part of the path when creating uri
1 parent 104a00e commit b44b672

File tree

1 file changed

+4
-1
lines changed
  • Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex

1 file changed

+4
-1
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ internal List<Result> ExecuteWindowsIndexSearch(string indexQueryString, string
5151
{
5252
if (dataReaderResults.GetValue(0) != DBNull.Value && dataReaderResults.GetValue(1) != DBNull.Value)
5353
{
54-
var path = new Uri(dataReaderResults.GetString(1)).LocalPath;
54+
// # is URI syntax for the fragment component, need to be encoded so LocalPath returns complete path
55+
var encodedFragmentPath = dataReaderResults.GetString(1).Replace("#", "%23");
56+
57+
var path = new Uri(encodedFragmentPath).LocalPath;
5558

5659
if (dataReaderResults.GetString(2) == "Directory")
5760
{

0 commit comments

Comments
 (0)