lib/model: Clarify fileInfoBatch.flushIfFull criteria

This commit is contained in:
Jakob Borg 2019-03-05 21:34:04 +01:00
parent bd37f6da17
commit 9da3273eb8

View File

@ -2867,7 +2867,7 @@ func (b *fileInfoBatch) append(f protocol.FileInfo) {
}
func (b *fileInfoBatch) flushIfFull() error {
if len(b.infos) == maxBatchSizeFiles || b.size > maxBatchSizeBytes {
if len(b.infos) >= maxBatchSizeFiles || b.size >= maxBatchSizeBytes {
return b.flush()
}
return nil