mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-24 04:54:00 +00:00
7e0cd45b1c
This change updates the create-symlinks hook to always evaluate link paths in the container's root filesystem. In addition the executable is updated to return an error if a link could not be created. Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
19 lines
280 B
Go
19 lines
280 B
Go
//go:build !windows
|
|
// +build !windows
|
|
|
|
package symlink
|
|
|
|
import (
|
|
"path/filepath"
|
|
)
|
|
|
|
func evalSymlinks(path string) (string, error) {
|
|
return filepath.EvalSymlinks(path)
|
|
}
|
|
|
|
func isDriveOrRoot(p string) bool {
|
|
return p == string(filepath.Separator)
|
|
}
|
|
|
|
var isAbs = filepath.IsAbs
|