From 3f3d2c814b9d010e58aff95838ce0e1eff99785b Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Sun, 10 Mar 2019 17:05:39 +0100 Subject: [PATCH] lib/model: Remove unused code (#5591) --- lib/model/model.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/model/model.go b/lib/model/model.go index 7cd86cb54..9f5df97ef 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -1149,7 +1149,7 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon } } - go sendIndexes(conn, folder.ID, fs, m.folderIgnores[folder.ID], startSequence, dropSymlinks) + go sendIndexes(conn, folder.ID, fs, startSequence, dropSymlinks) } m.pmut.Lock() @@ -1885,7 +1885,7 @@ func (m *model) receivedFile(folder string, file protocol.FileInfo) { m.folderStatRef(folder).ReceivedFile(file.Name, file.IsDeleted()) } -func sendIndexes(conn protocol.Connection, folder string, fs *db.FileSet, ignores *ignore.Matcher, prevSequence int64, dropSymlinks bool) { +func sendIndexes(conn protocol.Connection, folder string, fs *db.FileSet, prevSequence int64, dropSymlinks bool) { deviceID := conn.ID() var err error @@ -1893,7 +1893,7 @@ func sendIndexes(conn protocol.Connection, folder string, fs *db.FileSet, ignore defer l.Debugf("Exiting sendIndexes for %s to %s at %s: %v", folder, deviceID, conn, err) // We need to send one index, regardless of whether there is something to send or not - prevSequence, err = sendIndexTo(prevSequence, conn, folder, fs, ignores, dropSymlinks) + prevSequence, err = sendIndexTo(prevSequence, conn, folder, fs, dropSymlinks) // Subscribe to LocalIndexUpdated (we have new information to send) and // DeviceDisconnected (it might be us who disconnected, so we should @@ -1916,7 +1916,7 @@ func sendIndexes(conn protocol.Connection, folder string, fs *db.FileSet, ignore continue } - prevSequence, err = sendIndexTo(prevSequence, conn, folder, fs, ignores, dropSymlinks) + prevSequence, err = sendIndexTo(prevSequence, conn, folder, fs, dropSymlinks) // Wait a short amount of time before entering the next loop. If there // are continuous changes happening to the local index, this gives us @@ -1927,7 +1927,7 @@ func sendIndexes(conn protocol.Connection, folder string, fs *db.FileSet, ignore // sendIndexTo sends file infos with a sequence number higher than prevSequence and // returns the highest sent sequence number. -func sendIndexTo(prevSequence int64, conn protocol.Connection, folder string, fs *db.FileSet, ignores *ignore.Matcher, dropSymlinks bool) (int64, error) { +func sendIndexTo(prevSequence int64, conn protocol.Connection, folder string, fs *db.FileSet, dropSymlinks bool) (int64, error) { deviceID := conn.ID() initial := prevSequence == 0 batch := newFileInfoBatch(nil)