mirror of
https://github.com/restic/restic.git
synced 2024-12-25 01:06:39 +00:00
s3: Delete ignores error if the object doesn't exist
This commit is contained in:
parent
dd6ce5f9d8
commit
9053b2000b
1 changed files with 5 additions and 0 deletions
|
@ -291,6 +291,11 @@ func (be *Backend) Remove(ctx context.Context, h restic.Handle) error {
|
|||
objName := be.Filename(h)
|
||||
err := be.client.RemoveObject(be.bucketname, objName)
|
||||
debug.Log("Remove(%v) at %v -> err %v", h, objName, err)
|
||||
|
||||
if be.IsNotExist(err) {
|
||||
err = nil
|
||||
}
|
||||
|
||||
return errors.Wrap(err, "client.RemoveObject")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue