diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index a3eff5b7..c6608c2a 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -28,17 +28,17 @@ }, { "ImportPath": "github.com/minio/minio-go", - "Comment": "v0.1.0", - "Rev": "115db4940219a4cb142281d0ee216d85599bd4b9" + "Comment": "v0.1.0-5-g1a605dc", + "Rev": "1a605dcbedc298fe5d2da0840220a79a7c756298" }, { "ImportPath": "github.com/minio/minio/pkg/iodine", - "Comment": "release-1434511043-18-g792e6c2", - "Rev": "792e6c2d3a0bee392abd049e70f0cad52a5f8320" + "Comment": "release-1434511043-154-g784d403", + "Rev": "784d4033f73452ab9f20643da9f9085f638e705e" }, { "ImportPath": "github.com/minio/pb", - "Rev": "48437da7a8df656ce8a124f49c97dc88421cf528" + "Rev": "e3e099c334cd89a6fe993f0683eaafd85604290f" }, { "ImportPath": "github.com/olekukonko/ts", diff --git a/Godeps/_workspace/src/github.com/minio/minio-go/api.go b/Godeps/_workspace/src/github.com/minio/minio-go/api.go index d29d1022..709fa90e 100644 --- a/Godeps/_workspace/src/github.com/minio/minio-go/api.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/api.go @@ -624,27 +624,34 @@ func (a api) listObjectsInRoutine(bucket, prefix string, recursive bool, ch chan } } default: - result, err := a.listObjects(bucket, "", prefix, "/", 1000) - if err != nil { - ch <- ObjectStatCh{ - Stat: ObjectStat{}, - Err: err, + var marker string + for { + result, err := a.listObjects(bucket, marker, prefix, "/", 1000) + if err != nil { + ch <- ObjectStatCh{ + Stat: ObjectStat{}, + Err: err, + } + return } - return - } - for _, object := range result.Contents { - ch <- ObjectStatCh{ - Stat: object, - Err: nil, + marker = result.NextMarker + for _, object := range result.Contents { + ch <- ObjectStatCh{ + Stat: object, + Err: nil, + } } - } - for _, prefix := range result.CommonPrefixes { - object := ObjectStat{} - object.Key = prefix.Prefix - object.Size = 0 - ch <- ObjectStatCh{ - Stat: object, - Err: nil, + for _, prefix := range result.CommonPrefixes { + object := ObjectStat{} + object.Key = prefix.Prefix + object.Size = 0 + ch <- ObjectStatCh{ + Stat: object, + Err: nil, + } + } + if !result.IsTruncated { + break } } } diff --git a/Godeps/_workspace/src/github.com/minio/minio-go/api_handlers_test.go b/Godeps/_workspace/src/github.com/minio/minio-go/api_handlers_test.go index 61ecc553..8e8c3c5d 100644 --- a/Godeps/_workspace/src/github.com/minio/minio-go/api_handlers_test.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/api_handlers_test.go @@ -47,7 +47,7 @@ func (h bucketHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } fallthrough case r.URL.Path == "/bucket": - response := []byte("259d04a13802ae09c7e41be50ccc6baaobject2015-05-21T18:24:21.097Z22061miniominioSTANDARDfalse1000testbucket") + response := []byte("\"259d04a13802ae09c7e41be50ccc6baa\"object2015-05-21T18:24:21.097Z22061miniominioSTANDARDfalse1000testbucket") w.Header().Set("Content-Length", strconv.Itoa(len(response))) w.Write(response) } @@ -106,7 +106,7 @@ func (h objectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusInternalServerError) return } - w.Header().Set("ETag", "9af2f8218b150c351ad802c6f3d66abe") + w.Header().Set("ETag", "\"9af2f8218b150c351ad802c6f3d66abe\"") w.WriteHeader(http.StatusOK) case r.Method == "HEAD": if r.URL.Path != h.resource { @@ -115,7 +115,7 @@ func (h objectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } w.Header().Set("Content-Length", strconv.Itoa(len(h.data))) w.Header().Set("Last-Modified", time.Now().UTC().Format(http.TimeFormat)) - w.Header().Set("ETag", "9af2f8218b150c351ad802c6f3d66abe") + w.Header().Set("ETag", "\"9af2f8218b150c351ad802c6f3d66abe\"") w.WriteHeader(http.StatusOK) case r.Method == "POST": _, ok := r.URL.Query()["uploads"] @@ -144,7 +144,7 @@ func (h objectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } w.Header().Set("Content-Length", strconv.Itoa(len(h.data))) w.Header().Set("Last-Modified", time.Now().UTC().Format(http.TimeFormat)) - w.Header().Set("ETag", "9af2f8218b150c351ad802c6f3d66abe") + w.Header().Set("ETag", "\"9af2f8218b150c351ad802c6f3d66abe\"") w.WriteHeader(http.StatusOK) io.Copy(w, bytes.NewReader(h.data)) case r.Method == "DELETE":