client-s3: Stat() should return data for passed directories (#3539)
Co-authored-by: Anis Elleuch <anis@min.io>
This commit is contained in:
co-authored by
Anis Elleuch
parent
2b99236a22
commit
68720f67cc
+1
-1
@@ -1423,7 +1423,7 @@ func (c *S3Client) Stat(ctx context.Context, opts StatOptions) (*ClientContent,
|
||||
return nil, probe.NewError(objectStat.Err)
|
||||
}
|
||||
|
||||
if objectStat.Key == strings.TrimSuffix(object, string(c.targetURL.Separator)) {
|
||||
if object == objectStat.Key || object == strings.TrimSuffix(objectStat.Key, string(c.targetURL.Separator)) {
|
||||
return c.objectInfo2ClientContent(bucket, objectStat), nil
|
||||
}
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user