rebuild-index: correctly rebuild index for mixed packs
For mixed packs, data and tree blobs were stored in separate index entries. This results in warning from the check command and maybe other problems.
This commit is contained in:
parent
bb5f196b09
commit
04c23fa95d
4 changed files with 72 additions and 14 deletions
|
@ -339,7 +339,7 @@ func (mi *MasterIndex) Save(ctx context.Context, repo restic.SaverUnpacked, pack
|
|||
debug.Log("adding index %d", i)
|
||||
|
||||
for pbs := range idx.EachByPack(ctx, packBlacklist) {
|
||||
newIndex.StorePack(pbs.packID, pbs.blobs)
|
||||
newIndex.StorePack(pbs.PackID, pbs.Blobs)
|
||||
p.Add(1)
|
||||
if IndexFull(newIndex, mi.compress) {
|
||||
select {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue