From 0a4f7c0c06c296d5759845e077fe8446baf8de33 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 25 Aug 2020 21:36:26 +1000 Subject: [PATCH] change QuickFolderAccess behaviour to continue with index search Even if QuickAccessFolders results matched still continue to do fIles and folders search before returning the results. This behaviour caters situation where user has a temp location in quick folder access list but still wants to search for temp folder in other locations --- .../Search/SearchManager.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs index da2ae602b..bcac460f9 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs @@ -38,8 +38,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search var quickFolderLinks = quickFolderAccess.FolderListMatched(query, settings.QuickFolderAccessLinks, context); - if (string.IsNullOrEmpty(querySearch)) - return results; + if (quickFolderLinks.Count > 0) + results.AddRange(quickFolderLinks); if (IsFileContentSearch(query.ActionKeyword)) return WindowsIndexFileContentSearch(query, querySearch); @@ -53,7 +53,11 @@ namespace Flow.Launcher.Plugin.Explorer.Search var isEnvironmentVariablePath = querySearch.Substring(1).Contains("%\\"); if (!FilesFolders.IsLocationPathString(querySearch) && !isEnvironmentVariablePath) - return WindowsIndexFilesAndFoldersSearch(query, querySearch); + { + results.AddRange(WindowsIndexFilesAndFoldersSearch(query, querySearch)); + + return results; + } var locationPath = querySearch;