s3: Delete ignores error if the object doesn't exist

This commit is contained in:
Alexander Neumann 2017-06-15 16:06:47 +02:00
parent dd6ce5f9d8
commit 9053b2000b

View file

@ -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")
}