From d11f11748c7a764035d800455dc78f984b372ae8 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 5 Jan 2016 16:44:27 -0800 Subject: [PATCH] when we download during bootstrapClient we should save the root to cache Signed-off-by: David Lawrence (github: endophage) --- client/client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/client.go b/client/client.go index 9148bd215b..0e140d98f2 100644 --- a/client/client.go +++ b/client/client.go @@ -774,6 +774,12 @@ func (r *NotaryRepository) bootstrapClient(checkInitialized bool) (*tufclient.Cl if err != nil { return nil, err } + + err = r.fileStore.SetMeta("root", tmpJSON) + if err != nil { + // if we can't write cache we should still continue, just log error + logrus.Errorf("could not save root to cache: %s", err.Error()) + } } }