fix(s3): ignore current folder in contents (close #3137)

pull/3157/head
Noah Hsu 2023-01-25 19:58:00 +08:00
parent 6a90b1d40a
commit 44f8112e53
1 changed files with 3 additions and 0 deletions

View File

@ -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