From 775e915cfa5a58a89eb8dd19cc5285a3d1791a9f Mon Sep 17 00:00:00 2001 From: nihil Date: Sat, 10 May 2025 13:48:12 +0200 Subject: [PATCH] ignoring hidden directories --- RedundancyFinder/Finder.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/RedundancyFinder/Finder.cs b/RedundancyFinder/Finder.cs index 8ec7da6..0af1411 100644 --- a/RedundancyFinder/Finder.cs +++ b/RedundancyFinder/Finder.cs @@ -40,6 +40,13 @@ namespace RedundancyFinder { try { + // Check if the directory is hidden and skip it if true + var attributes = File.GetAttributes(directoryPath); + if ((attributes & FileAttributes.Hidden) == FileAttributes.Hidden) + { + return; + } + // Process files in the current directory foreach (var file in Directory.GetFiles(directoryPath)) {