lib/ignore: Refactor out result type (#9343)

This commit is contained in:
Jakob Borg
2024-01-13 18:58:23 +01:00
committed by GitHub
parent 36e08f8eee
commit e041877488
12 changed files with 155 additions and 87 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ func (f *BasicFilesystem) Watch(name string, ignore Matcher, ctx context.Context
if err != nil {
return true
}
return ignore.ShouldIgnore(rel)
return ignore.Match(rel).IsIgnored()
}
err = notify.WatchWithFilter(watchPath, backendChan, absShouldIgnore, eventMask)
} else {
@@ -94,7 +94,7 @@ func (f *BasicFilesystem) watchLoop(ctx context.Context, name string, roots []st
return
}
if ignore.ShouldIgnore(relPath) {
if ignore.Match(relPath).IsIgnored() {
l.Debugln(f.Type(), f.URI(), "Watch: Ignoring", relPath)
continue
}