From: Alex Brainman Date: Tue, 17 Jan 2012 05:51:02 +0000 (+1100) Subject: go/build: no back slash in FindTree returned pkg name X-Git-Tag: weekly.2012-01-20~88 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f320eb94f9ec057639b61bd03fc655838d85f6e3;p=gostls13.git go/build: no back slash in FindTree returned pkg name Fixes #2652. R=adg, rsc CC=golang-dev https://golang.org/cl/5516045 --- diff --git a/src/pkg/go/build/path.go b/src/pkg/go/build/path.go index bb9b8ca642..b86f8288ea 100644 --- a/src/pkg/go/build/path.go +++ b/src/pkg/go/build/path.go @@ -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