From 6c8e8f0391850e930cb2b99746f4d8996093c94a Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Sun, 19 Jan 2020 12:02:20 +0100 Subject: [PATCH] lib/model: Remove legacy handling of symlinks (#6276) This hardly seams relevant any more; 0.14.14 is dead since a long time. --- lib/model/model.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/model/model.go b/lib/model/model.go index 3cc96b17d..279caf3a9 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -34,7 +34,6 @@ import ( "github.com/syncthing/syncthing/lib/scanner" "github.com/syncthing/syncthing/lib/stats" "github.com/syncthing/syncthing/lib/sync" - "github.com/syncthing/syncthing/lib/upgrade" "github.com/syncthing/syncthing/lib/util" "github.com/syncthing/syncthing/lib/versioner" ) @@ -1120,7 +1119,6 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon m.pmut.RLock() conn, ok := m.conn[deviceID] closed := m.closed[deviceID] - hello := m.helloMessages[deviceID] m.pmut.RUnlock() if !ok { panic("bug: ClusterConfig called on closed or nonexistent connection") @@ -1129,14 +1127,6 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon changed := false deviceCfg := m.cfg.Devices()[deviceID] - // See issue #3802 - in short, we can't send modern symlink entries to older - // clients. - dropSymlinks := false - if hello.ClientName == m.clientName && upgrade.CompareVersions(hello.ClientVersion, "v0.14.14") < 0 { - l.Warnln("Not sending symlinks to old client", deviceID, "- please upgrade to v0.14.14 or newer") - dropSymlinks = true - } - // Needs to happen outside of the fmut, as can cause CommitConfiguration if deviceCfg.AutoAcceptFolders { for _, folder := range cm.Folders { @@ -1257,7 +1247,6 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon folder: folder.ID, fset: fs, prevSequence: startSequence, - dropSymlinks: dropSymlinks, evLogger: m.evLogger, } is.Service = util.AsService(is.serve, is.String()) @@ -2005,7 +1994,6 @@ type indexSender struct { dev string fset *db.FileSet prevSequence int64 - dropSymlinks bool evLogger events.Logger connClosed chan struct{} } @@ -2113,14 +2101,6 @@ func (s *indexSender) sendIndexTo(ctx context.Context) error { } f.LocalFlags = 0 // never sent externally - if s.dropSymlinks && f.IsSymlink() { - // Do not send index entries with symlinks to clients that can't - // handle it. Fixes issue #3802. Once both sides are upgraded, a - // rescan (i.e., change) of the symlink is required for it to - // sync again, due to delta indexes. - return true - } - batch.append(f) return true })