mirror of
https://github.com/restic/restic.git
synced 2026-10-06 02:40:31 +00:00
restic check and restic repair packs: treat missing packfiles the same as damaged and truncated packfiles (#21845)
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
This commit is contained in:
co-authored by
Michael Eischer
parent
e4056e70a8
commit
75de8b54e6
@@ -57,6 +57,7 @@ type ErrPackMetadata struct {
|
||||
ID restic.ID
|
||||
Orphaned bool
|
||||
Truncated bool
|
||||
Missing bool
|
||||
Err error
|
||||
}
|
||||
|
||||
@@ -218,7 +219,7 @@ func (c *Checker) Packs(ctx context.Context, errChan chan<- error) {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case errChan <- &ErrPackMetadata{ID: id, Err: errors.New("does not exist")}:
|
||||
case errChan <- &ErrPackMetadata{ID: id, Missing: true, Err: errors.New("does not exist")}:
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user