Commit 279199eb authored by Shenghou Ma's avatar Shenghou Ma

cmd/godoc: fix `godoc net/http` on windows

`godoc net/http` used to complain "/target contains more than one package: http, main"

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/6852100
parent 9e30b708
......@@ -853,12 +853,12 @@ type docServer struct {
// fsReadDir implements ReadDir for the go/build package.
func fsReadDir(dir string) ([]os.FileInfo, error) {
return fs.ReadDir(dir)
return fs.ReadDir(filepath.ToSlash(dir))
}
// fsOpenFile implements OpenFile for the go/build package.
func fsOpenFile(name string) (r io.ReadCloser, err error) {
data, err := ReadFile(fs, name)
data, err := ReadFile(fs, filepath.ToSlash(name))
if err != nil {
return nil, err
}
......
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