Commit 8c7a73bb authored by Andrew Gerrand's avatar Andrew Gerrand

go/build: evaluate symlinks before comparing path to GOPATH

R=golang-dev, r, dsymonds
CC=golang-dev
https://golang.org/cl/4645078
parent 3cd8f27d
...@@ -88,6 +88,9 @@ func FindTree(path string) (tree *Tree, pkg string, err os.Error) { ...@@ -88,6 +88,9 @@ func FindTree(path string) (tree *Tree, pkg string, err os.Error) {
if path, err = filepath.Abs(path); err != nil { if path, err = filepath.Abs(path); err != nil {
return return
} }
if path, err = filepath.EvalSymlinks(path); err != nil {
return
}
for _, t := range Path { for _, t := range Path {
tpath := t.SrcDir() + string(filepath.Separator) tpath := t.SrcDir() + string(filepath.Separator)
if !strings.HasPrefix(path, tpath) { if !strings.HasPrefix(path, tpath) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment