Skip to content

Commit

Permalink
If a symlink is a directory, match it against the patterns as a direc…
Browse files Browse the repository at this point in the history
…tory
  • Loading branch information
gilbertchen committed Nov 22, 2019
1 parent 9baafda commit b32c3b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/duplicacy_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

2 comments on commit b32c3b2

@gilbertchen
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Duplicacy Forum. There might be relevant details there:

https://forum.duplicacy.com/t/cli-2-3-0-released/2871/1

@gilbertchen
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Duplicacy Forum. There might be relevant details there:

https://forum.duplicacy.com/t/couple-of-gotchas-i-came-across-with-filters/2881/2

Please sign in to comment.