mirror of
https://github.com/rclone/rclone.git
synced 2025-08-17 00:51:34 +02:00
Make --include rules add their implict exclude * at the end of the filter list
This means you can mix `--include` and `--include-from` with the other filters (eg `--exclude`) but you must include all the files you want in the include statement. Fixes #280
This commit is contained in:
@ -147,16 +147,15 @@ func TestNewFilterFull(t *testing.T) {
|
||||
}
|
||||
got := f.DumpFilters()
|
||||
want := `+ (^|/)include1$
|
||||
- (^|/)[^/]*$
|
||||
+ (^|/)include2$
|
||||
+ (^|/)include3$
|
||||
- (^|/)[^/]*$
|
||||
- (^|/)exclude1$
|
||||
- (^|/)exclude2$
|
||||
- (^|/)exclude3$
|
||||
- (^|/)filter1$
|
||||
+ (^|/)filter2$
|
||||
- (^|/)filter3$`
|
||||
- (^|/)filter3$
|
||||
- (^|/)[^/]*$`
|
||||
if got != want {
|
||||
t.Errorf("rules want %s got %s", want, got)
|
||||
}
|
||||
|
Reference in New Issue
Block a user