]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: no back slash in FindTree returned pkg name
authorAlex Brainman <alex.brainman@gmail.com>
Tue, 17 Jan 2012 05:51:02 +0000 (16:51 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Tue, 17 Jan 2012 05:51:02 +0000 (16:51 +1100)
Fixes #2652.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/5516045

src/pkg/go/build/path.go

index bb9b8ca642a123f8a63b2c4d19ada8760d43ddf1..b86f8288ea6d9527a6b59688d8d12e06821f4dd5 100644 (file)
@@ -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