Windows: Fix long path handling for docker build

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
This commit is contained in:
Stefan J. Wernli 2015-08-24 14:07:22 -07:00
parent 5bebf3cbac
commit fe637416e9
9 changed files with 214 additions and 10 deletions

View file

@ -132,3 +132,12 @@ func evalSymlinksInScope(path, root string) (string, error) {
// what's happening here
return filepath.Clean(root + filepath.Clean(string(filepath.Separator)+b.String())), nil
}
// EvalSymlinks returns the path name after the evaluation of any symbolic
// links.
// If path is relative the result will be relative to the current directory,
// unless one of the components is an absolute symbolic link.
// This version has been updated to support long paths prepended with `\\?\`.
func EvalSymlinks(path string) (string, error) {
return evalSymlinks(path)
}