mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 21:39:10 +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 {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to resolve symlink: %v", err)
|
return "", fmt.Errorf("failed to resolve symlink: %v", err)
|
||||||
}
|
}
|
||||||
|
if link == name {
|
||||||
|
return name, nil
|
||||||
|
}
|
||||||
|
|
||||||
// We return absolute paths for all targets
|
// We return absolute paths for all targets
|
||||||
if !filepath.IsAbs(link) || strings.HasPrefix(link, ".") {
|
if !filepath.IsAbs(link) || strings.HasPrefix(link, ".") {
|
||||||
|
Loading…
Reference in New Issue
Block a user