mirror of
https://github.com/golang/go
synced 2024-11-05 16:06:10 -07:00
cmd/godoc: do not apply package path restrictions onto GOROOT when indexing.
Fixes golang/go#6925. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/156540043
This commit is contained in:
parent
5f5b110a59
commit
b916c559e7
@ -179,9 +179,12 @@ func (c *Corpus) newDirectory(root string, maxDepth int) *Directory {
|
||||
case err != nil:
|
||||
log.Printf("newDirectory(%s): %s", root, err)
|
||||
return nil
|
||||
case !isPkgDir(d):
|
||||
case root != "/" && !isPkgDir(d):
|
||||
log.Printf("newDirectory(%s): not a package directory", root)
|
||||
return nil
|
||||
case root == "/" && !d.IsDir():
|
||||
log.Printf("newDirectory(%s): not a directory", root)
|
||||
return nil
|
||||
}
|
||||
if maxDepth < 0 {
|
||||
maxDepth = 1e6 // "infinity"
|
||||
|
Loading…
Reference in New Issue
Block a user