Skip to content

Commit e5ba262

Browse files
authored
Merge pull request #150 from Flow-Launcher/fix_localpath_fragmentsymbol
Fix missing fragment portion of the file path
2 parents b040eba + 6dd7259 commit e5ba262

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ 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
56+
.GetString(1)
57+
.Replace("#", "%23", StringComparison.OrdinalIgnoreCase);
58+
59+
var path = new Uri(encodedFragmentPath).LocalPath;
5560

5661
if (dataReaderResults.GetString(2) == "Directory")
5762
{

Plugins/Flow.Launcher.Plugin.Explorer/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"Name": "Explorer",
88
"Description": "Search and manage files and folders. Explorer utilises Windows Index Search",
99
"Author": "Jeremy Wu",
10-
"Version": "1.2.2",
10+
"Version": "1.2.4",
1111
"Language": "csharp",
1212
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
1313
"ExecuteFileName": "Flow.Launcher.Plugin.Explorer.dll",

0 commit comments

Comments
 (0)