From f386c4247214f2f6d1ba99d9d5d1fc2954aec0c9 Mon Sep 17 00:00:00 2001 From: Gs-itisitcat <66198929+Gs-itisitcat@users.noreply.github.com> Date: Mon, 11 Mar 2024 04:02:05 +0900 Subject: [PATCH] Fix empty string for glob matcher in Non recursive searcher --- .../Searcher/NonRecursiveRepositorySearcher.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/local-repository-listing/Searcher/NonRecursiveRepositorySearcher.cs b/local-repository-listing/Searcher/NonRecursiveRepositorySearcher.cs index 9925cbe..cce3c65 100644 --- a/local-repository-listing/Searcher/NonRecursiveRepositorySearcher.cs +++ b/local-repository-listing/Searcher/NonRecursiveRepositorySearcher.cs @@ -56,6 +56,7 @@ private bool IsMatchExclude(DirectoryInfo directoryInfo) { return directoryInfo.FullName .Split(Path.DirectorySeparatorChar) + .Where(p => !string.IsNullOrEmpty(p)) .Any(p => _nameMatcher.Match(p).HasMatches) || ExcludePaths .Any(p => directoryInfo.FullName