tree-walk: unify FS and XL tree-walk with functional approach. (#2027)

This commit is contained in:
Krishna Srinivas authored and Harshavardhana committed 2016-07-04 01:49:27 -07:00
1 parent a8a3e95835
commit 7a8b8cd0a1
7 files changed
+233 -382

No files matched your search

+3 -2
View File
@@ -468,9 +468,10 @@ func (fs fsObjects) listObjects(bucket, prefix, marker, delimiter string, maxKey
walkResultCh, endWalkCh := fs.listPool.Release(listParams{bucket, recursive, marker, prefix})
if walkResultCh == nil {
endWalkCh = make(chan struct{})
walkResultCh = fs.startTreeWalk(bucket, prefix, marker, recursive, func(bucket, object string) bool {
listDir := listDirFactory(func(bucket, object string) bool {
return !strings.HasSuffix(object, slashSeparator)
}, endWalkCh)
}, fs.storage)
walkResultCh = startTreeWalk(bucket, prefix, marker, recursive, listDir, endWalkCh)
}
var fileInfos []FileInfo
var eof bool