From f3b5cb89ce0bc76a5c0cb0219bf39e788242026c Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 16 Jul 2019 13:25:39 +0200 Subject: [PATCH] Download update index if not available --- main.go | 2 +- updates/main.go | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 1600e363..f7858590 100644 --- a/main.go +++ b/main.go @@ -31,7 +31,7 @@ func init() { func main() { // Set Info - info.Set("Portmaster", "0.3.1", "AGPLv3", true) + info.Set("Portmaster", "0.3.2", "AGPLv3", true) // Start err := modules.Start() diff --git a/updates/main.go b/updates/main.go index 395e2f92..b8ce1071 100644 --- a/updates/main.go +++ b/updates/main.go @@ -61,7 +61,13 @@ func start() error { err = LoadIndexes() if err != nil { if os.IsNotExist(err) { - log.Infof("updates: stable.json does not yet exist, waiting for first update cycle") + // download indexes + log.Infof("updates: downloading update index...") + + err = UpdateIndexes() + if err != nil { + return err + } } else { return err }