Skip to content

Commit

Permalink
fix handling of directories in Stat (#3092)
Browse files Browse the repository at this point in the history
Fixes #3089
Fixes #3091
  • Loading branch information
harshavardhana authored Feb 25, 2020
1 parent fd89251 commit 67e90b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/client-s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ func (c *s3Client) Stat(isIncomplete, isFetchMeta, isPreserve bool, sse encrypt.
if objectStat.Err != nil {
return nil, probe.NewError(objectStat.Err)
}
if strings.HasSuffix(prefix, string(c.targetURL.Separator)) {
if strings.HasSuffix(objectStat.Key, string(c.targetURL.Separator)) {
objectMetadata.URL = *c.targetURL
objectMetadata.Type = os.ModeDir
if isFetchMeta {
Expand Down

0 comments on commit 67e90b8

Please sign in to comment.