mantle/platform: fix error handling in ibmcloud/s3 CopyObject
I suspect this was a copy/paste error. `BucketAlreadyOwnedByYou` is
an error reported from createBucket(), which we aren't calling here.
@@ -174,10 +174,9 @@ func (a *API) CopyObject(srcBucket, srcName, destBucket string) error {
})
if err != nil {
if awserr, ok := err.(awserr.Error); ok {
- if awserr.Code() == "BucketAlreadyOwnedByYou" {
- return nil
- }
+ err = awserr
}
+ return fmt.Errorf("Error copying object to bucket: %v", err)
}
// Wait to see if the item got copied
