Stop ErrFinishedWalk from escaping from Repositories walk

Signed-off-by: Edgar Lee <edgar.lee@docker.com>
This commit is contained in:
Edgar Lee
2016-08-05 17:21:48 -07:00
parent bfa0a9c097
commit 379312c148
2 changed files with 13 additions and 10 deletions

View File

@@ -9,7 +9,6 @@ import (
"strconv"
"github.com/docker/distribution/registry/api/errcode"
"github.com/docker/distribution/registry/storage"
"github.com/docker/distribution/registry/storage/driver"
"github.com/gorilla/handlers"
)
@@ -51,7 +50,7 @@ func (ch *catalogHandler) GetCatalog(w http.ResponseWriter, r *http.Request) {
if err == io.EOF || pathNotFound {
moreEntries = false
} else if err != nil && err != storage.ErrFinishedWalk {
} else if err != nil {
ch.Errors = append(ch.Errors, errcode.ErrorCodeUnknown.WithDetail(err))
return
}