lib/ignore: Refactor out result type (#9343)
This commit is contained in:
@@ -53,7 +53,7 @@ func (f *sendOnlyFolder) pull() (bool, error) {
|
||||
|
||||
file := intf.(protocol.FileInfo)
|
||||
|
||||
if f.ignores.ShouldIgnore(intf.FileName()) {
|
||||
if f.ignores.Match(intf.FileName()).IsIgnored() {
|
||||
file.SetIgnored()
|
||||
batch.Append(file)
|
||||
l.Debugln(f, "Handling ignored file", file)
|
||||
|
||||
@@ -343,7 +343,7 @@ func (f *sendReceiveFolder) processNeeded(snap *db.Snapshot, dbUpdateChan chan<-
|
||||
file := intf.(protocol.FileInfo)
|
||||
|
||||
switch {
|
||||
case f.ignores.ShouldIgnore(file.Name):
|
||||
case f.ignores.Match(file.Name).IsIgnored():
|
||||
file.SetIgnored()
|
||||
l.Debugln(f, "Handling ignored file", file)
|
||||
dbUpdateChan <- dbUpdateJob{file, dbUpdateInvalidate}
|
||||
|
||||
Reference in New Issue
Block a user