s3: report errors on bucket creation (mkdir) correctly

Before this fix errors on bucket creation were being silently
swallowed.

See: https://forum.rclone.org/t/rclone-with-brand-new-aws-account-for-s3/15590
This commit is contained in:
Nick Craig-Wood 2020-04-15 13:13:13 +01:00
parent 9eb17e4ade
commit e2bf91452a

View file

@ -1738,7 +1738,7 @@ func (f *Fs) makeBucket(ctx context.Context, bucket string) error {
err = nil
}
}
return nil
return err
}, func() (bool, error) {
return f.bucketExists(ctx, bucket)
})