mirror of
https://github.com/octoleo/restic.git
synced 2024-11-24 21:57:41 +00:00
fixed restic-check does not retry backend.Test failures
added missing RetryBackend.Test implementation Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
This commit is contained in:
parent
180741609e
commit
8c550ca011
@ -117,3 +117,14 @@ func (be *RetryBackend) Remove(ctx context.Context, h restic.Handle) (err error)
|
||||
return be.Backend.Remove(ctx, h)
|
||||
})
|
||||
}
|
||||
|
||||
// Test a boolean value whether a File with the name and type exists.
|
||||
func (be *RetryBackend) Test(ctx context.Context, h restic.Handle) (exists bool, err error) {
|
||||
err = be.retry(ctx, fmt.Sprintf("Test(%v)", h), func() error {
|
||||
var innerError error
|
||||
exists, innerError = be.Backend.Test(ctx, h)
|
||||
|
||||
return innerError
|
||||
})
|
||||
return exists, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user