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 | da7f5bc052feb9cc3aece3fc4579c110dbe33f6b (patch) | |
tree | d1dadb2e78cf8349c5c7b42a657a2046a8a667bd | |
parent | ef254d07a977104d68d04d0d6b356e2142a1b1c7 (diff) | |
download | go-da7f5bc052feb9cc3aece3fc4579c110dbe33f6b.tar.gz |
go/build: evaluate symlinks before comparing path to GOPATH
R=golang-dev, r, dsymonds
CC=golang-dev
http://codereview.appspot.com/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 8ad39fb0f..ea588abbd 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) { |