Skip to content

Commit

Permalink
extended APIs to be avoided with Cloud S3
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Mar 3, 2020
1 parent b65d679 commit a43cca3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/client-s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,10 @@ func (c *s3Client) SetAccess(bucketPolicy string, isJSON bool) *probe.Error {

// listObjectWrapper - select ObjectList version depending on the target hostname
func (c *s3Client) listObjectWrapper(bucket, object string, isRecursive bool, doneCh chan struct{}, metadata bool) <-chan minio.ObjectInfo {
cloud := isAmazon(c.URL.Host) || isGoogle(c.URL.Host) || isAmazonAccelerated(c.URL.Host) || isAmazonChina(c.URL.Host)
if cloud {
return c.api.ListObjectsV2(bucket, object, isRecursive, doneCh)
}
if metadata {
return c.api.ListObjectsV2WithMetadata(bucket, object, isRecursive, doneCh)
}
Expand Down

0 comments on commit a43cca3

Please sign in to comment.