Skip to content

Commit

Permalink
avoid panic in copyObject
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Sep 11, 2024
1 parent 33e8e5c commit 11d8cef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gofakes3.go
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,9 @@ func (g *GoFakeS3) copyObject(bucket, object string, meta map[string]string, w h

// XXX No support for versionId subresource
parts := strings.SplitN(strings.TrimPrefix(source, "/"), "/", 2)
if len(parts) != 2 {
return ErrInvalidArgument
}
srcBucket := parts[0]
srcKey := strings.SplitN(parts[1], "?", 2)[0]

Expand Down

0 comments on commit 11d8cef

Please sign in to comment.