do not bother printing index read errors

foo
vilmibm 2021-04-27 17:27:59 +00:00
parent 6644d7a806
commit 34574c0713
1 changed files with 1 additions and 3 deletions

View File

@ -138,7 +138,7 @@ func indexPathFor(username string) (string, error) {
}
if indexPath == "" {
return "", fmt.Errorf("Failed to locate index file for %v; tried %v; encountered errors: %v", username, potentialPaths, errs)
return "", fmt.Errorf("failed to locate index file for %v; tried %v; encountered errors: %v", username, potentialPaths, errs)
}
return indexPath, nil
@ -148,7 +148,6 @@ func pageTitleFor(username string) string {
pageTitleRe := regexp.MustCompile(`<title[^>]*>(.*)</title>`)
indexPath, err := indexPathFor(username)
if err != nil {
log.Print(err)
return ""
}
content, err := ioutil.ReadFile(indexPath)
@ -201,7 +200,6 @@ func mtimeFor(username string) int64 {
func detectDefaultPageFor(username string, defaultHTML []byte) bool {
indexPath, err := indexPathFor(username)
if err != nil {
log.Print(err)
return false
}
indexFile, err := os.Open(indexPath)