1
0
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:
Yasuhiro Matsumoto 2011-03-18 09:28:23 -07:00 committed by Robert Griesemer
parent b22e29d9bf
commit 8c4a2ae6f8

View File

@ -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