Commit 3b3568ba authored by Yasuhiro Matsumoto's avatar Yasuhiro Matsumoto Committed by Robert Griesemer

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

R=gri
CC=golang-dev
https://golang.org/cl/4129046
parent cf75c86c
......@@ -217,7 +217,6 @@ func makeRx(names []string) (rx *regexp.Regexp) {
return
}
func main() {
flag.Usage = usage
flag.Parse()
......@@ -318,7 +317,7 @@ func main() {
}
relpath := path
abspath := path
if len(path) > 0 && path[0] != '/' {
if !pathutil.IsAbs(path) {
abspath = absolutePath(path, pkgHandler.fsRoot)
} else {
relpath = relativePath(path)
......@@ -339,7 +338,7 @@ func main() {
if info.Err != nil || info.PAst == nil && info.PDoc == nil && info.Dirs == nil {
// try again, this time assume it's a command
if len(path) > 0 && path[0] != '/' {
if !pathutil.IsAbs(path) {
abspath = absolutePath(path, cmdHandler.fsRoot)
}
info = cmdHandler.getPageInfo(abspath, relpath, "", mode)
......
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