lib/ignore: Consistent behaviour for nil *Matcher
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4310
This commit is contained in:
@@ -85,6 +85,9 @@ func Walk(ctx context.Context, cfg Config) (chan protocol.FileInfo, error) {
|
||||
if w.Filesystem == nil {
|
||||
panic("no filesystem specified")
|
||||
}
|
||||
if w.Matcher == nil {
|
||||
w.Matcher = ignore.New(w.Filesystem)
|
||||
}
|
||||
|
||||
return w.walk(ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user