diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index 6aba9fcb5..38bf63f89 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -192,8 +192,8 @@ namespace Flow.Launcher.Plugin.Explorer SubTitle = "Path: " + record.FullPath, Action = _ => { - if(!Main.Settings.IndexSearchExcludedDirectoryPaths.Any(x => x == record.FullPath)) - Main.Settings.IndexSearchExcludedDirectoryPaths.Add(record.FullPath); + if(!Main.Settings.IndexSearchExcludedSubdirectoryPaths.Any(x => x == record.FullPath)) + Main.Settings.IndexSearchExcludedSubdirectoryPaths.Add(record.FullPath); return false; }, diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs index ad6cdd9dc..65a2f4ac9 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs @@ -112,8 +112,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search if (!_settings.UseWindowsIndexForDirectorySearch) return false; - if (_settings.IndexSearchExcludedDirectoryPaths - .Any(x => x == FilesFolders.ReturnPreviousDirectoryIfIncompleteString(locationPath))) + if (_settings.IndexSearchExcludedSubdirectoryPaths + .Any(x => FilesFolders.ReturnPreviousDirectoryIfIncompleteString(locationPath).StartsWith(x))) return false; return _indexSearch.PathIsIndexed(locationPath); diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs index ffa7fadd1..6b442384d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs @@ -17,6 +17,6 @@ namespace Flow.Launcher.Plugin.Explorer public bool UseWindowsIndexForDirectorySearch { get; set; } = true; [JsonProperty] - public List IndexSearchExcludedDirectoryPaths { get; set; } = new List(); + public List IndexSearchExcludedSubdirectoryPaths { get; set; } = new List(); } }