Merge "website: get subdirs info even when no source files"

This commit is contained in:
mpl 2013-07-09 21:35:58 +00:00 committed by Gerrit Code Review
commit d8c3b5a4e9
1 changed files with 5 additions and 1 deletions

View File

@ -239,6 +239,10 @@ func getPageInfo(pkgName, diskPath string) (pi PageInfo, err error) {
}
bpkg, err := build.ImportDir(diskPath, 0)
if err != nil {
if _, ok := err.(*build.NoGoError); ok {
pi.populateDirs(diskPath, -1)
return pi, nil
}
return
}
inSet := make(map[string]bool)
@ -274,7 +278,7 @@ func getPageInfo(pkgName, diskPath string) (pi PageInfo, err error) {
pi.IsPkg = strings.Contains(pkgName, domainName+pkgPattern)
// get directory information
pi.populateDirs(diskPath, 1)
pi.populateDirs(diskPath, -1)
return
}