mirror of
https://github.com/restic/restic.git
synced 2025-12-23 02:56:15 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user