Fix list request to registry to properly page

This commit is contained in:
Matt Nikkel
2021-11-29 19:04:18 -05:00
parent de366c7b9b
commit dc02554118
+3 -2
View File
@@ -7,7 +7,6 @@ import (
"net/http"
"net/http/httptest"
"regexp"
"strconv"
"time"
"github.com/distribution/distribution/v3/configuration"
@@ -93,7 +92,9 @@ func (s *Store) List(ctx context.Context) ([]string, error) {
for {
chunk := make([]string, 20) // randomly chosen number...
nf, err := reg.Repositories(ctx, chunk, last)
last = strconv.Itoa(nf)
if nf > 0 {
last = chunk[nf-1]
}
for _, e := range chunk {
if e == "" {