From 24e7caa14631669709b8e128d9abf547a15e488c Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 3 Mar 2020 23:13:10 +0300 Subject: [PATCH] Use listObjectsV1 for GCS S3 implementation (#3101) Fixes #3073 --- cmd/client-s3.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/client-s3.go b/cmd/client-s3.go index 94a520d5..f9b85817 100644 --- a/cmd/client-s3.go +++ b/cmd/client-s3.go @@ -1213,6 +1213,11 @@ 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 { + if isGoogle(c.targetURL.Host) { + // Google Cloud S3 layer doesn't implement ListObjectsV2 implementation + // https://github.com/minio/mc/issues/3073 + return c.api.ListObjects(bucket, object, isRecursive, doneCh) + } if metadata { return c.api.ListObjectsV2WithMetadata(bucket, object, isRecursive, doneCh) }