Skip to content

Commit

Permalink
fix handling of directories in Stat
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Feb 25, 2020
1 parent 4152714 commit 7aa6d22
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 7aa6d22

Please sign in to comment.