s3: fix for unchecked err value in s3 listv2

This commit is contained in:
Aaron Gokaslan 2022-11-10 06:52:59 -05:00 committed by GitHub
parent b285efb476
commit b0248e8070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -3159,8 +3159,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