ignoring hidden directories

This commit is contained in:
nihil 2025-05-10 13:48:12 +02:00
parent 95e53b00ec
commit 775e915cfa

View File

@ -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))
{