DirectoryInfoPath- fix partial item search

This commit is contained in:
Jeremy Wu 2020-05-27 07:30:52 +10:00
parent e22abba18c
commit c93f4a09ea

View file

@ -1,4 +1,4 @@
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin.SharedCommands;
using System;
using System.Collections.Generic;
@ -45,6 +45,18 @@ namespace Flow.Launcher.Plugin.Explorer.Search.DirectoryInfo
// incompleteName = "*" + incompleteName.Substring(1);
//}
if (!search.EndsWith("\\"))
{
// not full path, get previous level directory string
var indexOfSeparator = search.LastIndexOf('\\');
incompleteName = search.Substring(indexOfSeparator + 1).ToLower();
search = search.Substring(0, indexOfSeparator + 1);
}
incompleteName += "*";
var folderList = new List<Result>();
var fileList = new List<Result>();