From b32c3b2cd52ee99f17c2252c938b8e5d932a6586 Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Thu, 21 Nov 2019 23:10:54 -0500 Subject: [PATCH] If a symlink is a directory, match it against the patterns as a directory --- src/duplicacy_entry.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/duplicacy_entry.go b/src/duplicacy_entry.go index f171ef8..aae7c2d 100644 --- a/src/duplicacy_entry.go +++ b/src/duplicacy_entry.go @@ -513,6 +513,9 @@ func ListEntries(top string, path string, fileList *[]*Entry, patterns []string, // path from f.Name(); note that a "/" is append assuming a symbolic link is always a directory newEntry.Path = filepath.Join(normalizedPath, f.Name()) + "/" } + if len(patterns) > 0 && !MatchPath(newEntry.Path, patterns) { + continue + } entry = newEntry } }