lib/db: Reset index-id when dropping device (#7135)

This commit is contained in:
Simon Frei 2020-11-20 14:17:09 +01:00 committed by GitHub
parent b43eccf2fe
commit 641b7aee38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,6 +74,13 @@ func (s *FileSet) Drop(device protocol.DeviceID) {
// announced from the remote is newer than our current sequence
// number.
s.meta.resetAll(device)
// Also reset the index ID, as we do want a full index retransfer
// if we ever reconnect, regardless of if the index ID changed.
if err := s.db.setIndexID(device[:], []byte(s.folder), 0); backend.IsClosed(err) {
return
} else if err != nil {
fatalError(err, opStr, s.db)
}
}
t, err := s.db.newReadWriteTransaction()