Commit f320eb94 authored by Alex Brainman's avatar Alex Brainman

go/build: no back slash in FindTree returned pkg name

Fixes #2652.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/5516045
parent 9b54af20
...@@ -105,14 +105,14 @@ func FindTree(path string) (tree *Tree, pkg string, err error) { ...@@ -105,14 +105,14 @@ func FindTree(path string) (tree *Tree, pkg string, err error) {
continue continue
} }
tree = t tree = t
pkg = path[len(tpath):] pkg = filepath.ToSlash(path[len(tpath):])
return return
} }
err = fmt.Errorf("path %q not inside a GOPATH", path) err = fmt.Errorf("path %q not inside a GOPATH", path)
return return
} }
tree = defaultTree tree = defaultTree
pkg = path pkg = filepath.ToSlash(path)
for _, t := range Path { for _, t := range Path {
if t.HasSrc(pkg) { if t.HasSrc(pkg) {
tree = t tree = t
......
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