Resolve all symlinks in ldcache

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2023-04-14 13:55:32 +02:00
parent 46c1c45d85
commit fc7c8f7520
3 changed files with 4 additions and 6 deletions

View File

@@ -307,11 +307,7 @@ func (c *ldcache) resolve(target string) (string, error) {
link = filepath.Join(filepath.Dir(target), link)
}
// Ensure that the returned path is relative to the root.
link = filepath.Join(c.root, link)
c.logger.Debugf("Resolved link: '%v' => '%v'", name, link)
return link, nil
return c.resolve(link)
}
// bytesToString converts a byte slice to a string.