From 5b77fb703084eaec9b7a2a459648603acd01c1ec Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Sat, 2 Aug 2025 18:00:45 +1000 Subject: [PATCH] ignore bin and obj folders --- .../Features/SolutionDiscovery/TreeMapV2.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SharpIDE.Application/Features/SolutionDiscovery/TreeMapV2.cs b/src/SharpIDE.Application/Features/SolutionDiscovery/TreeMapV2.cs index 37b133c..de33e9e 100644 --- a/src/SharpIDE.Application/Features/SolutionDiscovery/TreeMapV2.cs +++ b/src/SharpIDE.Application/Features/SolutionDiscovery/TreeMapV2.cs @@ -18,6 +18,8 @@ public static class TreeMapperV2 var subFolders = rootFolder.GetSubFolders(); return subFolders; } + + private static readonly string[] _excludedFolders = ["bin", "obj", "node_modules"]; public static List GetSubFolders(this SharpIdeFolder folder) { var directoryInfo = new DirectoryInfo(folder.Path); @@ -30,7 +32,7 @@ public static class TreeMapperV2 { IgnoreInaccessible = false, AttributesToSkip = FileAttributes.ReparsePoint - }).ToList(); + }).Where(s => _excludedFolders.Contains(s.Name, StringComparer.InvariantCultureIgnoreCase) is false).ToList(); } catch (UnauthorizedAccessException) {