Commit c06d7cc3 authored by David Venhoek's avatar David Venhoek
Browse files

Changed UpdateSchemes to run ParseFolder only when new schemes were actually...

Changed UpdateSchemes to run ParseFolder only when new schemes were actually downloaded, based on suggestion by Sietse.
parent 7980dc44
......@@ -1245,13 +1245,17 @@ func (conf *Configuration) UpdateSchemeManager(id SchemeManagerIdentifier, downl
}
func (conf *Configuration) UpdateSchemes() error {
var updated IrmaIdentifierSet
for id := range conf.SchemeManagers {
Logger.WithField("scheme", id).Info("Auto-updating scheme")
if err := conf.UpdateSchemeManager(id, nil); err != nil {
if err := conf.UpdateSchemeManager(id, &updated); err != nil {
return err
}
}
return conf.ParseFolder()
if !updated.Empty() {
return conf.ParseFolder()
}
return nil
}
func (conf *Configuration) AutoUpdateSchemes(interval uint) {
......
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