nvidia-container-toolkit/vendor/github.com/moby/sys/symlink/fs_unix.go
Christopher Desiniotis 7e0cd45b1c
Check for valid paths in create-symlinks hook
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>
2024-10-29 12:16:51 -07:00

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