mirror of
https://github.com/rclone/rclone.git
synced 2025-06-25 06:23:03 +02:00
s3: fix detection of BucketAlreadyOwnedByYou and BucketAlreadyExists error
This was being silently ignored until this commit e2bf91452a263ff8 s3: report errors on bucket creation (mkdir) correctly
This commit is contained in:
parent
86eaf43b00
commit
f8039deb7c
@ -1733,8 +1733,8 @@ func (f *Fs) makeBucket(ctx context.Context, bucket string) error {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
fs.Infof(f, "Bucket %q created with ACL %q", bucket, f.opt.BucketACL)
|
fs.Infof(f, "Bucket %q created with ACL %q", bucket, f.opt.BucketACL)
|
||||||
}
|
}
|
||||||
if err, ok := err.(awserr.Error); ok {
|
if awsErr, ok := err.(awserr.Error); ok {
|
||||||
if err.Code() == "BucketAlreadyOwnedByYou" {
|
if code := awsErr.Code(); code == "BucketAlreadyOwnedByYou" || code == "BucketAlreadyExists" {
|
||||||
err = nil
|
err = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user