mirror of
https://github.com/golang/go
synced 2024-11-22 02:54:39 -07:00
go/build: no back slash in FindTree returned pkg name
Fixes #2652. R=adg, rsc CC=golang-dev https://golang.org/cl/5516045
This commit is contained in:
parent
9b54af2020
commit
f320eb94f9
@ -105,14 +105,14 @@ func FindTree(path string) (tree *Tree, pkg string, err error) {
|
||||
continue
|
||||
}
|
||||
tree = t
|
||||
pkg = path[len(tpath):]
|
||||
pkg = filepath.ToSlash(path[len(tpath):])
|
||||
return
|
||||
}
|
||||
err = fmt.Errorf("path %q not inside a GOPATH", path)
|
||||
return
|
||||
}
|
||||
tree = defaultTree
|
||||
pkg = path
|
||||
pkg = filepath.ToSlash(path)
|
||||
for _, t := range Path {
|
||||
if t.HasSrc(pkg) {
|
||||
tree = t
|
||||
|
Loading…
Reference in New Issue
Block a user