From 1a5160c7aa5b23b1ffceeb106a444fc0875fc31a Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Thu, 10 Nov 2022 06:52:59 -0500 Subject: [PATCH] s3: fix for unchecked err value in s3 listv2 --- backend/s3/s3.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 715db1b6a..aa9d5e18b 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -3151,8 +3151,11 @@ func (f *Fs) newV2List(req *s3.ListObjectsV2Input) bucketLister { // Do a V2 listing func (ls *v2List) List(ctx context.Context) (resp *s3.ListObjectsV2Output, versionIDs []*string, err error) { resp, err = ls.f.c.ListObjectsV2WithContext(ctx, &ls.req) + if err != nil { + return nil, nil, err + } ls.req.ContinuationToken = resp.NextContinuationToken - return resp, nil, err + return resp, nil, nil } // URL Encode the listings