mirror of
https://github.com/octoleo/restic.git
synced 2025-01-24 07:38:25 +00:00
Merge pull request #4978 from konidev20/fix-gh-4949-repair-index-spurious-index
rewrite: skip saving empty indexes during MasterIndex.Rewrite
This commit is contained in:
commit
d2f7c5a9c6
@ -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…
x
Reference in New Issue
Block a user