diff --git a/updater/storage.go b/updater/storage.go index 5e6de27..f444d04 100644 --- a/updater/storage.go +++ b/updater/storage.go @@ -82,7 +82,9 @@ func (reg *ResourceRegistry) LoadIndexes() error { var firstErr error for _, idx := range reg.getIndexes() { err := reg.loadIndexFile(idx) - if err != nil && reg.Online { + if err == nil { + log.Debugf("%s: loaded index %s", reg.Name, idx.Path) + } else if reg.Online { // try to download the index file if a local disk version // does not exist or we don't have permission to read it. if os.IsNotExist(err) || os.IsPermission(err) { diff --git a/updater/updating.go b/updater/updating.go index 3788eac..8e1a4cc 100644 --- a/updater/updating.go +++ b/updater/updating.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" "io/ioutil" - "os" "path/filepath" "github.com/safing/portbase/utils" @@ -56,7 +55,10 @@ func (reg *ResourceRegistry) downloadIndex(idx Index) error { } // add resources to registry - _ = reg.AddResources(new, false, idx.Stable, idx.Beta) + err = reg.AddResources(new, false, idx.Stable, idx.Beta) + if err != nil { + log.Warningf("%s: failed to add resources: %s", reg.Name, err) + } // save index err = ioutil.WriteFile(filepath.Join(reg.storageDir.Path, idx.Path), data, 0644)