From 30f7e631005308139a4fdc8e428fd90950a89338 Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Tue, 28 Oct 2014 12:26:29 +1100 Subject: [PATCH] go.tools/godoc: do not assume that all windows paths are delimited by os.PathSeparator (fixes build) Fixes golang/go#9003. LGTM=adg R=golang-codereviews, adg CC=golang-codereviews https://golang.org/cl/161420043 --- godoc/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/godoc/server.go b/godoc/server.go index 0373679cc6..5923b79036 100644 --- a/godoc/server.go +++ b/godoc/server.go @@ -216,7 +216,7 @@ func (h *handlerServer) includePath(path string, mode PageInfoMode) (r bool) { return true } if strings.Contains(path, "internal") { - for _, c := range strings.Split(path, string(os.PathSeparator)) { + for _, c := range strings.Split(filepath.Clean(path), string(os.PathSeparator)) { if c == "internal" { return false }