forked from TrueCloudLab/rclone
filter: make sure we check --files-from when looking for a single file
This commit is contained in:
parent
1ad22b8881
commit
2c5923ab1a
1 changed files with 5 additions and 0 deletions
|
@ -375,6 +375,11 @@ func (f *Filter) InActive() bool {
|
||||||
|
|
||||||
// IncludeRemote returns whether this remote passes the filter rules.
|
// IncludeRemote returns whether this remote passes the filter rules.
|
||||||
func (f *Filter) IncludeRemote(remote string) bool {
|
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 {
|
for _, rule := range f.fileRules.rules {
|
||||||
if rule.Match(remote) {
|
if rule.Match(remote) {
|
||||||
return rule.Include
|
return rule.Include
|
||||||
|
|
Loading…
Add table
Reference in a new issue