mirror of
https://github.com/golang/go
synced 2024-11-22 00:24:41 -07:00
godoc: No need to use filepath.IsAbs()
R=golang-dev, brainman, gri CC=golang-dev https://golang.org/cl/4277062
This commit is contained in:
parent
b22e29d9bf
commit
8c4a2ae6f8
@ -343,7 +343,7 @@ func (root *Directory) listing(skipRoot bool) *DirList {
|
||||
path = d.Path[len(root.Path):]
|
||||
}
|
||||
// remove trailing separator if any - path must be relative
|
||||
if len(path) > 0 && filepath.IsAbs(path) {
|
||||
if len(path) > 0 && path[0] == filepath.Separator {
|
||||
path = path[1:]
|
||||
}
|
||||
p.Path = path
|
||||
|
Loading…
Reference in New Issue
Block a user