Skip to content

Commit

Permalink
fix swift
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-pro committed Sep 29, 2022
1 parent 83530bd commit b282a13
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/object/swift.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ func (s *swiftOSS) List(prefix, marker, delimiter string, limit int64) ([]Object
for i, o := range objects {
// https://docs.openstack.org/swift/latest/api/pseudo-hierarchical-folders-directories.html
if delimiter != "" && o.PseudoDirectory {
objs = append(objs, &obj{o.SubDir, 0, time.Unix(0, 0), true})
objs[i] = &obj{o.SubDir, 0, time.Unix(0, 0), true}
} else {
objs[i] = &obj{o.Name, o.Bytes, o.LastModified, strings.HasSuffix(o.Name, "/")}
}
objs[i] = &obj{o.Name, o.Bytes, o.LastModified, strings.HasSuffix(o.Name, "/")}
}
return objs, nil
}
Expand Down

0 comments on commit b282a13

Please sign in to comment.