From 661f197f68ab05d292f4cf1bf13f2c96b778cab6 Mon Sep 17 00:00:00 2001 From: Sylvain Baubeau Date: Thu, 2 Jul 2015 18:27:13 +0200 Subject: [PATCH] Retrieve all the objects using pagination Signed-off-by: Sylvain Baubeau --- docs/storage/driver/swift/swift.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/storage/driver/swift/swift.go b/docs/storage/driver/swift/swift.go index 08c79c89..4daf7ccc 100644 --- a/docs/storage/driver/swift/swift.go +++ b/docs/storage/driver/swift/swift.go @@ -433,7 +433,7 @@ func (d *driver) List(ctx context.Context, path string) ([]string, error) { Delimiter: '/', } - objects, err := d.Conn.Objects(d.Container, opts) + objects, err := d.Conn.ObjectsAll(d.Container, opts) for _, obj := range objects { files = append(files, strings.TrimPrefix(strings.TrimSuffix(obj.Name, "/"), d.swiftPath("/"))) } @@ -459,7 +459,7 @@ func (d *driver) Delete(ctx context.Context, path string) error { Prefix: d.swiftPath(path) + "/", } - objects, err := d.Conn.Objects(d.Container, &opts) + objects, err := d.Conn.ObjectsAll(d.Container, &opts) if err != nil { return parseError(path, err) } @@ -531,7 +531,7 @@ func (d *driver) getContentType() string { } func (d *driver) getAllSegments(path string) ([]swift.Object, error) { - return d.Conn.Objects(d.Container, &swift.ObjectsOpts{Prefix: d.swiftSegmentPath(path)}) + return d.Conn.ObjectsAll(d.Container, &swift.ObjectsOpts{Prefix: d.swiftSegmentPath(path)}) } func (d *driver) createManifest(path string) (*swift.ObjectCreateFile, error) {