From 807fbd4d89e29d8a99cc34180a7e0e9968737c86 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Fri, 4 Sep 2020 05:46:34 +1000 Subject: [PATCH] fix missing fragment portion of LocalPath (#6257) --- .../SearchHelper/WindowsSearchAPI.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/SearchHelper/WindowsSearchAPI.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/SearchHelper/WindowsSearchAPI.cs index fbc31ff9a8..84b0bdbf1f 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/SearchHelper/WindowsSearchAPI.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/SearchHelper/WindowsSearchAPI.cs @@ -58,7 +58,10 @@ namespace Microsoft.Plugin.Indexer.SearchHelper continue; } - var uri_path = new Uri((string)oleDBResult.FieldData[0]); + // # is URI syntax for the fragment component, need to be encoded so LocalPath returns complete path + var string_path = ((string)oleDBResult.FieldData[0]).Replace("#", "%23", StringComparison.OrdinalIgnoreCase); + var uri_path = new Uri(string_path); + var result = new SearchResult { Path = uri_path.LocalPath,