From b31bad1c4ddd06e3e2c6294e2f9d750343964c44 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Mon, 12 Mar 2018 20:16:40 +0100 Subject: [PATCH] lib/model: Remove unused shouldIgnore function (#4805) --- lib/model/model.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/model/model.go b/lib/model/model.go index d7ea8c9f..3b4a5c74 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -2823,22 +2823,6 @@ func makeForgetUpdate(files []protocol.FileInfo) []protocol.FileDownloadProgress return updates } -// shouldIgnore returns true when a file should be excluded from processing -func shouldIgnore(file db.FileIntf, matcher *ignore.Matcher, ignoreDelete bool) bool { - switch { - case ignoreDelete && file.IsDeleted(): - // ignoreDelete first because it's a very cheap test so a win if it - // succeeds, and we might in the long run accumulate quite a few - // deleted files. - return true - - case matcher.ShouldIgnore(file.FileName()): - return true - } - - return false -} - // folderDeviceSet is a set of (folder, deviceID) pairs type folderDeviceSet map[string]map[protocol.DeviceID]struct{}