mirror of
https://github.com/golang/go
synced 2024-11-21 21:24:45 -07:00
godoc: log errors when reading filter files
R=r, r2 CC=golang-dev https://golang.org/cl/4230042
This commit is contained in:
parent
87fe958a49
commit
11bda7df47
@ -148,8 +148,13 @@ func readDirList(filename string) ([]string, os.Error) {
|
||||
}
|
||||
// create a sorted list of valid directory names
|
||||
filter := func(path string) bool {
|
||||
d, err := os.Lstat(path)
|
||||
return err == nil && isPkgDir(d)
|
||||
d, e := os.Lstat(path)
|
||||
if e != nil && err == nil {
|
||||
// remember first error and return it from readDirList
|
||||
// so we have at least some information if things go bad
|
||||
err = e
|
||||
}
|
||||
return e == nil && isPkgDir(d)
|
||||
}
|
||||
list := canonicalizePaths(strings.Split(string(contents), "\n", -1), filter)
|
||||
// for each parent path, remove all it's children q
|
||||
@ -161,7 +166,7 @@ func readDirList(filename string) ([]string, os.Error) {
|
||||
i++
|
||||
}
|
||||
}
|
||||
return list[0:i], nil
|
||||
return list[0:i], err
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user