mirror of
https://github.com/golang/go
synced 2024-11-19 14:54:43 -07:00
go/build: evaluate symlinks before comparing path to GOPATH
R=golang-dev, r, dsymonds CC=golang-dev https://golang.org/cl/4645078
This commit is contained in:
parent
3cd8f27d79
commit
8c7a73bbbb
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user