From 04f5525f207e3f2324df41c7bb17f4d17df4fa5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8A=98=E7=BA=B8=E9=A3=9E=E6=9C=BA?= Date: Fri, 14 Mar 2025 17:21:24 +0100 Subject: [PATCH] fix(s3): incorrectly added slash before the Bucket name (#8083 close #8001) --- drivers/s3/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s3/util.go b/drivers/s3/util.go index 99f271aa..e02945a0 100644 --- a/drivers/s3/util.go +++ b/drivers/s3/util.go @@ -199,7 +199,7 @@ func (d *S3) copyFile(ctx context.Context, src string, dst string) error { dstKey := getKey(dst, false) input := &s3.CopyObjectInput{ Bucket: &d.Bucket, - CopySource: aws.String(url.PathEscape("/" + d.Bucket + "/" + srcKey)), + CopySource: aws.String(url.PathEscape(d.Bucket + "/" + srcKey)), Key: &dstKey, } _, err := d.client.CopyObject(input)