Skip to content

Commit 1eec9ce

Browse files
fix handling of directories in Stat
Fixes minio#3089 Fixes minio#3091
1 parent fd89251 commit 1eec9ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/client-s3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@ func (c *s3Client) Stat(isIncomplete, isFetchMeta, isPreserve bool, sse encrypt.
12871287
if objectStat.Err != nil {
12881288
return nil, probe.NewError(objectStat.Err)
12891289
}
1290-
if strings.HasSuffix(prefix, string(c.targetURL.Separator)) {
1290+
if strings.HasSuffix(objectStat.Key, string(c.targetURL.Separator)) {
12911291
objectMetadata.URL = *c.targetURL
12921292
objectMetadata.Type = os.ModeDir
12931293
if isFetchMeta {

0 commit comments

Comments
 (0)