Skip to content

Commit

Permalink
fix(s3): ignore current folder in contents (close #3137)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Jan 25, 2023
1 parent 6a90b1d commit 44f8112
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/s3/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ func (d *S3) listV2(prefix string) ([]model.Obj, error) {
files = append(files, &file)
}
for _, object := range listObjectsResult.Contents {
if strings.HasSuffix(*object.Key, "/") {
continue
}
name := path.Base(*object.Key)
if name == getPlaceholderName(d.Placeholder) || name == d.Placeholder {
continue
Expand Down

0 comments on commit 44f8112

Please sign in to comment.