Reduce memory usage for prune

This commit is contained in:
Alexander Neumann 2017-01-12 22:14:31 +01:00
parent 094e80f4a4
commit 0556687584

View file

@ -46,9 +46,8 @@ func (mi *MasterIndex) LookupSize(id restic.ID, tpe restic.BlobType) (uint, erro
defer mi.idxMutex.RUnlock()
for _, idx := range mi.idx {
length, err := idx.LookupSize(id, tpe)
if err == nil {
return length, nil
if idx.Has(id, tpe) {
return idx.LookupSize(id, tpe)
}
}