Skip to content

Commit 9adaf56

Browse files
committed
Honor ignore for folders
1 parent 4da4bb9 commit 9adaf56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AutoSSHApp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ private static long BackupFolder(HostEntry host, string root, string path, SftpC
353353
{
354354
Interlocked.Add(ref size, BackupFile(root, _file.FullName, client));
355355
});
356-
Parallel.ForEach(files.Where(f => f.IsDirectory), parallelOptions2, (folder) =>
356+
Parallel.ForEach(files.Where(f => f.IsDirectory && (host.IgnoreRegex == null || !host.IgnoreRegex.IsMatch(f.FullName))), parallelOptions2, (folder) =>
357357
{
358358
Interlocked.Add(ref size, BackupFolder(host, root, folder.FullName, client, log));
359359
});

0 commit comments

Comments
 (0)