mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
change to exclude sub-directories too from index search
This commit is contained in:
parent
2c15f1ce70
commit
06877ca06b
3 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
public bool UseWindowsIndexForDirectorySearch { get; set; } = true;
|
||||
|
||||
[JsonProperty]
|
||||
public List<string> IndexSearchExcludedDirectoryPaths { get; set; } = new List<string>();
|
||||
public List<string> IndexSearchExcludedSubdirectoryPaths { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue