From e115710c1607de5ecc4a0f42e224ced503c8b624 Mon Sep 17 00:00:00 2001 From: Baptiste Foy Date: Wed, 14 Sep 2022 14:56:12 +0200 Subject: [PATCH] fix(localMeta): Add delegated targets back to localMeta Signed-off-by: Baptiste Foy --- client/client.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/client.go b/client/client.go index f103d8024..6b93d0a7e 100644 --- a/client/client.go +++ b/client/client.go @@ -423,6 +423,16 @@ func (c *Client) getLocalMeta() error { c.loadTargets(targets.Targets) } } + + for fileName := range meta { + if fileName != "targets.json" && + fileName != "snapshot.json" && + fileName != "root.json" && + fileName != "timestamp.json" { + c.localMeta[fileName] = meta[fileName] + } + } + if loadFailed { // If any of the metadata failed to be verified, return the reason for that failure return retErr