@ -60,7 +60,7 @@ type listWorkerReq struct {
func ( fs Filesystem ) listObjects ( bucket , prefix , marker , delimiter string , maxKeys int ) ( chan <- listWorkerReq , * probe . Error ) {
quitWalker := make ( chan bool )
reqCh := make ( chan listWorkerReq )
walkerCh := make ( chan ObjectMetadata )
walkerCh := make ( chan ObjectMetadata , 1000 )
go func ( ) {
defer close ( walkerCh )
var walkPath string
@ -144,8 +144,14 @@ func (fs Filesystem) listObjects(bucket, prefix, marker, delimiter string, maxKe
for object := range walkerCh {
// Verify if the object is lexically smaller than
// the marker, we will skip those objects.
if marker != "" {
if marker >= object . Object {
continue
} else {
// Reset marker so that we avoid comparing
// again and again in a loop unecessarily.
marker = ""
}
}
if delimiter != "" {
// Prefixes are only valid wth delimiters, and