lib/db: Don't count invalid items to global state (ref #6850) (#6863)

This commit is contained in:
Simon Frei
2020-07-30 13:49:14 +02:00
committed by GitHub
parent e46c8ab9ee
commit 850dd4cd25
5 changed files with 27 additions and 52 deletions
+1 -3
View File
@@ -288,9 +288,7 @@ func (s *Snapshot) ReceiveOnlyChangedSize() Counts {
}
func (s *Snapshot) GlobalSize() Counts {
global := s.meta.Counts(protocol.GlobalDeviceID, 0)
recvOnlyChanged := s.meta.Counts(protocol.GlobalDeviceID, protocol.FlagLocalReceiveOnly)
return global.Add(recvOnlyChanged)
return s.meta.Counts(protocol.GlobalDeviceID, 0)
}
func (s *Snapshot) NeedSize(device protocol.DeviceID) Counts {