Commit 11bda7df authored by Robert Griesemer's avatar Robert Griesemer

godoc: log errors when reading filter files

R=r, r2
CC=golang-dev
https://golang.org/cl/4230042
parent 87fe958a
......@@ -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
}
......
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