1
0
mirror of https://github.com/golang/go synced 2024-11-21 14:14:40 -07:00

godoc: godoc: Use IsAbs to test for absolute paths (fix for win32).

One more case.

R=r, r2
CC=golang-dev
https://golang.org/cl/4170044
This commit is contained in:
Robert Griesemer 2011-02-10 16:32:51 -08:00
parent 3b3568ba49
commit a75e5fc670

View File

@ -60,10 +60,10 @@ func canonicalizePaths(list []string, filter func(path string) bool) []string {
continue // ignore empty paths (don't assume ".")
}
// len(path) > 0: normalize path
if path[0] != '/' {
path = pathutil.Join(cwd, path)
} else {
if pathutil.IsAbs(path) {
path = pathutil.Clean(path)
} else {
path = pathutil.Join(cwd, path)
}
// we have a non-empty absolute path
if filter != nil && !filter(path) {