From 75c2e524a1bbfd6eb678b0db7a3b3178e73b756a Mon Sep 17 00:00:00 2001 From: uhayate Date: Mon, 13 Feb 2017 17:20:07 +0800 Subject: [PATCH] refactor the code style in distribution/registry/storage/driver/s3-goamz/s3.go Signed-off-by: uhayate --- registry/storage/driver/s3-goamz/s3.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/registry/storage/driver/s3-goamz/s3.go b/registry/storage/driver/s3-goamz/s3.go index 33751c16..4af86765 100644 --- a/registry/storage/driver/s3-goamz/s3.go +++ b/registry/storage/driver/s3-goamz/s3.go @@ -443,14 +443,14 @@ func (d *driver) List(ctx context.Context, opath string) ([]string, error) { directories = append(directories, strings.Replace(commonPrefix[0:len(commonPrefix)-1], d.s3Path(""), prefix, 1)) } - if listResponse.IsTruncated { - listResponse, err = d.Bucket.List(d.s3Path(path), "/", listResponse.NextMarker, listMax) - if err != nil { - return nil, err - } - } else { + if !listResponse.IsTruncated { break } + + listResponse, err = d.Bucket.List(d.s3Path(path), "/", listResponse.NextMarker, listMax) + if err != nil { + return nil, err + } } if opath != "/" {