Browse Source

lib/model: Remove superfluous check for IndexID in remote ClusterConfig (#5717)

The check in ClusterConfig() when iterating through announced devices
in a folder explicitly skips entries without a non-zero IndexID.
Therefore, the check for IndexID == 0 just below will never be true
and the intended cleanup of local index data will not happen.

Plainly remove that check to make the intended case distinction work.
André Colomb 6 years ago
parent
commit
e4956358fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/model/model.go

+ 1 - 1
lib/model/model.go

@@ -1118,7 +1118,7 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
 					l.Infof("Device %v folder %s has mismatching index ID for us (%v != %v)", deviceID, folder.Description(), dev.IndexID, myIndexID)
 					startSequence = 0
 				}
-			} else if dev.ID == deviceID && dev.IndexID != 0 {
+			} else if dev.ID == deviceID {
 				// This is the other side's description of themselves. We
 				// check to see that it matches the IndexID we have on file,
 				// otherwise we drop our old index data and expect to get a