From ec58939e555c92f2d112b4027b89d063cdcbcaf0 Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sat, 9 Sep 2023 01:49:18 +0800
Subject: [PATCH] Fix exclude path check for index search
---
Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs | 2 +-
Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
index dd4dcc7a4..4137ca8d0 100644
--- a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
+++ b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
@@ -263,7 +263,7 @@ namespace Flow.Launcher.Plugin.SharedCommands
}
///
- /// Returns if contains .
+ /// Returns if contains . Equal paths are not considered to be contained by default.
/// From https://stackoverflow.com/a/66877016
///
/// Parent path
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs
index f58ac43e8..28b25b59c 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs
@@ -123,7 +123,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
}
results.RemoveWhere(r => Settings.IndexSearchExcludedSubdirectoryPaths.Any(
- excludedPath => FilesFolders.PathContains(excludedPath.Path, r.SubTitle)));
+ excludedPath => FilesFolders.PathContains(excludedPath.Path, r.SubTitle, true)));
return results.ToList();
}