1
Fork 0

Parse config file in group.Update.

This makes for better error messages.
This commit is contained in:
Juliusz Chroboczek 2021-10-30 19:28:51 +02:00
parent c00f84bd9d
commit 028ed7df6d
1 changed files with 9 additions and 1 deletions

View File

@ -1102,6 +1102,14 @@ func GetPublic() []Status {
// list of public groups. It also removes from memory any non-public
// groups that haven't been accessed in maxHistoryAge.
func Update() {
_, err := GetConfiguration()
if err != nil {
log.Printf("%v: %v",
filepath.Join(DataDirectory, "config.json"),
err,
)
}
names := GetNames()
for _, name := range names {
@ -1122,7 +1130,7 @@ func Update() {
}
}
err := filepath.Walk(
err = filepath.Walk(
Directory,
func(path string, fi os.FileInfo, err error) error {
if err != nil {