Fix client-s3.Makebucket behavior with object in path (#3470)

This commit is contained in:
Anis Elleuch
2020-11-06 09:38:43 -08:00
committed by GitHub
parent 0289d32164
commit 965747e45d
+1 -4
View File
@@ -1196,10 +1196,7 @@ func (c *S3Client) MakeBucket(ctx context.Context, region string, ignoreExisting
}
if object != "" {
if !strings.HasSuffix(object, string(c.targetURL.Separator)) {
object = path.Dir(object)
}
if !strings.HasSuffix(object, string(c.targetURL.Separator)) {
return probe.NewError(BucketNameTopLevel{})
object += string(c.targetURL.Separator)
}
var retried bool
for {