mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Fix infinite recursion when resolving ldcache
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
39263ea365
commit
a6b0f45d2c
@ -293,6 +293,9 @@ func (c *ldcache) resolve(target string) (string, error) {
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to resolve symlink: %v", err)
|
||||
}
|
||||
if link == name {
|
||||
return name, nil
|
||||
}
|
||||
|
||||
// We return absolute paths for all targets
|
||||
if !filepath.IsAbs(link) || strings.HasPrefix(link, ".") {
|
||||
|
Loading…
Reference in New Issue
Block a user