1
mirror of https://github.com/rclone/rclone synced 2024-12-28 21:03:45 +01:00

filter: make sure we check --files-from when looking for a single file

This commit is contained in:
Nick Craig-Wood 2022-08-11 12:20:17 +01:00
parent 1ad22b8881
commit 2c5923ab1a

View File

@ -375,6 +375,11 @@ func (f *Filter) InActive() bool {
// IncludeRemote returns whether this remote passes the filter rules.
func (f *Filter) IncludeRemote(remote string) bool {
// filesFrom takes precedence
if f.files != nil {
_, include := f.files[remote]
return include
}
for _, rule := range f.fileRules.rules {
if rule.Match(remote) {
return rule.Include