From b44b67220a5f4da227146f9deeb046501f9cbdd1 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Mon, 31 Aug 2020 07:39:05 +1000 Subject: [PATCH] encode # symbol part of the path when creating uri --- .../Search/WindowsIndex/IndexSearch.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs index 08511091e..cc91de025 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs @@ -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") {