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