Continue instead of break on error when listing libraries

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-12-05 16:17:39 +01:00
parent 7a1cfb48b9
commit 80672d33af

View File

@ -208,7 +208,7 @@ func (c *ldcache) List() ([]string, []string) {
n := bytes.IndexByte(value, 0) n := bytes.IndexByte(value, 0)
if n < 0 { if n < 0 {
break continue
} }
name := filepath.Join(c.root, strn(value, n)) name := filepath.Join(c.root, strn(value, n))
@ -217,7 +217,7 @@ func (c *ldcache) List() ([]string, []string) {
path, err := filepath.EvalSymlinks(name) path, err := filepath.EvalSymlinks(name)
if err != nil { if err != nil {
c.logger.Debugf("could not resolve symlink for %v", name) c.logger.Debugf("could not resolve symlink for %v", name)
break continue
} }
if processed[path] { if processed[path] {
continue continue