fix: Changed exceeding range error for the source object in UploadPartCopy action

This commit is contained in:
jonaustin09
2024-06-20 14:12:03 -04:00
parent be098d2031
commit fe19bfaed9
3 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -1209,7 +1209,7 @@ func (p *Posix) UploadPartCopy(ctx context.Context, upi *s3.UploadPartCopyInput)
}
if startOffset+length > fi.Size()+1 {
return s3response.CopyObjectResult{}, s3err.GetAPIError(s3err.ErrInvalidRange)
return s3response.CopyObjectResult{}, backend.CreateExceedingRangeErr(fi.Size())
}
f, err := p.openTmpFile(filepath.Join(*upi.Bucket, objdir),