client-s3: Recursive List() avoids listing buckets (#2014)

This fixes bug in `mc mirror myminio/ /tmp/dir` since objectDifference() can only
take care of mirroring objects.
This commit is contained in:
Anis Elleuch
2017-02-13 13:47:49 -08:00
committed by Harshavardhana
parent ace3f452c3
commit 43388a06ca
-7
View File
@@ -1427,13 +1427,6 @@ func (c *s3Client) listRecursiveInRoutine(contentCh chan *clientContent) {
return
}
for _, bucket := range buckets {
bucketURL := *c.targetURL
bucketURL.Path = c.joinPath(bucket.Name)
contentCh <- &clientContent{
URL: bucketURL,
Type: os.ModeDir,
Time: bucket.CreationDate,
}
isRecursive := true
for object := range c.listObjectWrapper(bucket.Name, o, isRecursive, nil) {
// Return error if we encountered glacier object and continue.