Commit 8c4a2ae6 authored by Yasuhiro Matsumoto's avatar Yasuhiro Matsumoto Committed by Robert Griesemer

godoc: No need to use filepath.IsAbs()

R=golang-dev, brainman, gri
CC=golang-dev
https://golang.org/cl/4277062
parent b22e29d9
...@@ -343,7 +343,7 @@ func (root *Directory) listing(skipRoot bool) *DirList { ...@@ -343,7 +343,7 @@ func (root *Directory) listing(skipRoot bool) *DirList {
path = d.Path[len(root.Path):] path = d.Path[len(root.Path):]
} }
// remove trailing separator if any - path must be relative // 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:] path = path[1:]
} }
p.Path = path p.Path = path
......
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