mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
filter: prevent mix opts when filesfrom is present - fixes #3599
This commit is contained in:
committed by
Nick Craig-Wood
parent
bc45f6f952
commit
02c777ffbf
@@ -191,7 +191,12 @@ func NewFilter(opt *Opt) (f *Filter, err error) {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
inActive := f.InActive()
|
||||
for _, rule := range f.Opt.FilesFrom {
|
||||
if !inActive {
|
||||
return nil, fmt.Errorf("The usage of --files-from overrides all other filters, it should be used alone")
|
||||
}
|
||||
f.initAddFile() // init to show --files-from set even if no files within
|
||||
err := forEachLine(rule, func(line string) error {
|
||||
return f.AddFile(line)
|
||||
|
||||
Reference in New Issue
Block a user