From f62df7f6952799616da410b6e4d0217aa1b449db Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 5 Sep 2021 23:37:40 -0700 Subject: [PATCH] fix wrong srcPath checking --- weed/s3api/s3api_object_copy_handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/s3api/s3api_object_copy_handlers.go b/weed/s3api/s3api_object_copy_handlers.go index 86dec2b45..3cda1da53 100644 --- a/weed/s3api/s3api_object_copy_handlers.go +++ b/weed/s3api/s3api_object_copy_handlers.go @@ -53,7 +53,7 @@ func (s3a *S3ApiServer) CopyObjectHandler(w http.ResponseWriter, r *http.Request s3err.WriteErrorResponse(w, s3err.ErrInvalidCopySource, r) return } - srcPath := util.FullPath(fmt.Sprintf("%s/%s%s", s3a.option.BucketsPath, srcObject, srcObject)) + srcPath := util.FullPath(fmt.Sprintf("%s/%s%s", s3a.option.BucketsPath, srcBucket, srcObject)) dir, name := srcPath.DirAndName() _, err = s3a.getEntry(dir, name) if err != nil {