diff options
author | Andrew Gerrand <adg@golang.org> | 2011-07-04 10:26:03 +1000 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2011-07-04 10:26:03 +1000 |
commit | 8c7a73bbbba1c6a374d3ab334e378299c6c4236b (patch) | |
tree | 752f27316a5fdc71352695875be43c81096ba394 | |
parent | 3cd8f27d79604ac119ce732e87ac8a44fb998aaf (diff) | |
download | go-8c7a73bbbba1c6a374d3ab334e378299c6c4236b.tar.gz go-8c7a73bbbba1c6a374d3ab334e378299c6c4236b.zip |
go/build: evaluate symlinks before comparing path to GOPATH
R=golang-dev, r, dsymonds
CC=golang-dev
https://golang.org/cl/4645078
-rw-r--r-- | src/pkg/go/build/path.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/go/build/path.go b/src/pkg/go/build/path.go index 8ad39fb0f2..ea588abbd6 100644 --- a/src/pkg/go/build/path.go +++ b/src/pkg/go/build/path.go @@ -88,6 +88,9 @@ func FindTree(path string) (tree *Tree, pkg string, err os.Error) { if path, err = filepath.Abs(path); err != nil { return } + if path, err = filepath.EvalSymlinks(path); err != nil { + return + } for _, t := range Path { tpath := t.SrcDir() + string(filepath.Separator) if !strings.HasPrefix(path, tpath) { |