mirror of
https://github.com/golang/go
synced 2024-11-21 17:44: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:
parent
3b3568ba49
commit
a75e5fc670
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user