|
|
@ -357,6 +357,7 @@ func listMetaBucketMultipartFiles(layer ObjectLayer, prefixPath string, markerPa |
|
|
|
|
|
|
|
|
|
|
|
// Following loop gathers and filters out special files inside
|
|
|
|
// Following loop gathers and filters out special files inside
|
|
|
|
// minio meta volume.
|
|
|
|
// minio meta volume.
|
|
|
|
|
|
|
|
outerLoop: |
|
|
|
for { |
|
|
|
for { |
|
|
|
walkResult, ok := <-walker.ch |
|
|
|
walkResult, ok := <-walker.ch |
|
|
|
if !ok { |
|
|
|
if !ok { |
|
|
@ -397,9 +398,9 @@ func listMetaBucketMultipartFiles(layer ObjectLayer, prefixPath string, markerPa |
|
|
|
fileInfos = append(fileInfos, fileInfo) |
|
|
|
fileInfos = append(fileInfos, fileInfo) |
|
|
|
newMaxKeys++ |
|
|
|
newMaxKeys++ |
|
|
|
// If we have reached the maxKeys, it means we have listed
|
|
|
|
// If we have reached the maxKeys, it means we have listed
|
|
|
|
// everything that was requested. Return right here.
|
|
|
|
// everything that was requested.
|
|
|
|
if newMaxKeys == maxKeys { |
|
|
|
if newMaxKeys == maxKeys { |
|
|
|
return |
|
|
|
break outerLoop |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -415,13 +416,20 @@ func listMetaBucketMultipartFiles(layer ObjectLayer, prefixPath string, markerPa |
|
|
|
fileInfos = append(fileInfos, fi) |
|
|
|
fileInfos = append(fileInfos, fi) |
|
|
|
newMaxKeys++ |
|
|
|
newMaxKeys++ |
|
|
|
// If we have reached the maxKeys, it means we have listed
|
|
|
|
// If we have reached the maxKeys, it means we have listed
|
|
|
|
// everything that was requested. Return right here.
|
|
|
|
// everything that was requested.
|
|
|
|
if newMaxKeys == maxKeys { |
|
|
|
if newMaxKeys == maxKeys { |
|
|
|
return |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if !eof && len(fileInfos) != 0 { |
|
|
|
|
|
|
|
// EOF has not reached, hence save the walker channel to the map so that the walker go routine
|
|
|
|
|
|
|
|
// can continue from where it left off for the next list request.
|
|
|
|
|
|
|
|
lastFileInfo := fileInfos[len(fileInfos)-1] |
|
|
|
|
|
|
|
markerPath = lastFileInfo.Name |
|
|
|
|
|
|
|
saveTreeWalk(layer, listParams{minioMetaBucket, recursive, markerPath, prefixPath}, walker) |
|
|
|
|
|
|
|
} |
|
|
|
// Return entries here.
|
|
|
|
// Return entries here.
|
|
|
|
return fileInfos, eof, nil |
|
|
|
return fileInfos, eof, nil |
|
|
|
} |
|
|
|
} |
|
|
|