removed redundant check

Signed-off-by: eyjhb <eyjhbb@gmail.com
Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
This commit is contained in:
eyjhb 2023-06-27 12:27:00 +02:00 committed by David van der Spek
parent 230cc72a8b
commit 0f846853fe
Failed to extract signature

View file

@ -112,14 +112,6 @@ func (reg *registry) walkRepos(ctx context.Context, root, last string, fn func(r
// walkReposPath walks through all folders in `lookPath`,
// looking for repositories. See walkRepos for more detailed description.
func (reg *registry) walkReposPath(ctx context.Context, root, lookPath, last string, fn func(repoPath string) error) error {
// ensure that the current path is a dir, otherwise we just return
if f, err := reg.blobStore.driver.Stat(ctx, lookPath); err != nil || !f.IsDir() {
if err != nil {
return err
}
return nil
}
// get children in the current path
children, err := reg.blobStore.driver.List(ctx, lookPath)
if err != nil {