forked from TrueCloudLab/restic
rewrite: skip saving empty indexes during MasterIndex.Rewrite
This commit is contained in:
parent
8d5e188218
commit
068d5b95c3
1 changed files with 3 additions and 0 deletions
|
@ -456,6 +456,9 @@ func (mi *MasterIndex) Rewrite(ctx context.Context, repo restic.Unpacked, exclud
|
|||
worker := func() error {
|
||||
for idx := range saveCh {
|
||||
idx.Finalize()
|
||||
if len(idx.packs) == 0 {
|
||||
continue
|
||||
}
|
||||
if _, err := idx.SaveIndex(wgCtx, repo); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue