|
|
@ -44,6 +44,11 @@ const ( |
|
|
|
ZZZZMinioPrefix = "ZZZZ-Minio" |
|
|
|
ZZZZMinioPrefix = "ZZZZ-Minio" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check if object prefix is "ZZZZ_Minio".
|
|
|
|
|
|
|
|
func isGCSPrefix(prefix string) bool { |
|
|
|
|
|
|
|
return strings.TrimSuffix(prefix, slashSeparator) == ZZZZMinioPrefix |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Convert Minio errors to minio object layer errors.
|
|
|
|
// Convert Minio errors to minio object layer errors.
|
|
|
|
func gcsToObjectError(err error, params ...string) error { |
|
|
|
func gcsToObjectError(err error, params ...string) error { |
|
|
|
if err == nil { |
|
|
|
if err == nil { |
|
|
@ -325,7 +330,7 @@ func (l *gcsGateway) ListObjects(bucket string, prefix string, marker string, de |
|
|
|
|
|
|
|
|
|
|
|
attrs, _ := it.Next() |
|
|
|
attrs, _ := it.Next() |
|
|
|
if attrs == nil { |
|
|
|
if attrs == nil { |
|
|
|
} else if attrs.Prefix == ZZZZMinioPrefix { |
|
|
|
} else if isGCSPrefix(attrs.Prefix) { |
|
|
|
break |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -342,7 +347,7 @@ func (l *gcsGateway) ListObjects(bucket string, prefix string, marker string, de |
|
|
|
|
|
|
|
|
|
|
|
nextMarker = toGCSPageToken(attrs.Name) |
|
|
|
nextMarker = toGCSPageToken(attrs.Name) |
|
|
|
|
|
|
|
|
|
|
|
if attrs.Prefix == ZZZZMinioPrefix { |
|
|
|
if isGCSPrefix(attrs.Prefix) { |
|
|
|
// we don't return our metadata prefix
|
|
|
|
// we don't return our metadata prefix
|
|
|
|
continue |
|
|
|
continue |
|
|
|
} else if attrs.Prefix != "" { |
|
|
|
} else if attrs.Prefix != "" { |
|
|
|