mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix windows search empty paths
This commit is contained in:
parent
1f1940ae9b
commit
cabe944979
1 changed files with 4 additions and 4 deletions
|
|
@ -47,14 +47,14 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
|
||||||
while (await dataReader.ReadAsync(token))
|
while (await dataReader.ReadAsync(token))
|
||||||
{
|
{
|
||||||
token.ThrowIfCancellationRequested();
|
token.ThrowIfCancellationRequested();
|
||||||
if (dataReader.GetValue(0) == DBNull.Value || dataReader.GetValue(1) == DBNull.Value)
|
if (dataReader.GetValue(0) is DBNull
|
||||||
|
|| dataReader.GetValue(1) is not string rawFragmentPath
|
||||||
|
|| string.Equals(rawFragmentPath, "file:", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// # is URI syntax for the fragment component, need to be encoded so LocalPath returns complete path
|
// # is URI syntax for the fragment component, need to be encoded so LocalPath returns complete path
|
||||||
var encodedFragmentPath = dataReader
|
var encodedFragmentPath = rawFragmentPath.Replace("#", "%23", StringComparison.OrdinalIgnoreCase);
|
||||||
.GetString(1)
|
|
||||||
.Replace("#", "%23", StringComparison.OrdinalIgnoreCase);
|
|
||||||
|
|
||||||
var path = new Uri(encodedFragmentPath).LocalPath;
|
var path = new Uri(encodedFragmentPath).LocalPath;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue