Browse Source

fix wrong srcPath checking

pull/2321/head
Chris Lu 3 years ago
parent
commit
f62df7f695
  1. 2
      weed/s3api/s3api_object_copy_handlers.go

2
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) s3err.WriteErrorResponse(w, s3err.ErrInvalidCopySource, r)
return 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() dir, name := srcPath.DirAndName()
_, err = s3a.getEntry(dir, name) _, err = s3a.getEntry(dir, name)
if err != nil { if err != nil {

Loading…
Cancel
Save