From cfe757e58638c77ff23ba9e22e49255ad791b150 Mon Sep 17 00:00:00 2001 From: Baptiste Foy Date: Fri, 6 Jan 2023 11:20:50 +0100 Subject: [PATCH] fix(localMeta): Remove unnecessary calls to getDelegationPathFromRaw --- client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index f749bf1e..978ebf1d 100644 --- a/client/client.go +++ b/client/client.go @@ -435,7 +435,7 @@ func (c *Client) getLocalMeta() error { // verifiedDelegatedTargets is a set of verified delegated targets verifiedDelegatedTargets := make(map[string]bool) for fileName := range meta { - if roles.IsDelegatedTargetsManifest(fileName) { + if !verifiedDelegatedTargets[fileName] && roles.IsDelegatedTargetsManifest(fileName) { if delegationPath, err := c.getDelegationPathFromRaw(snapshot, meta[fileName]); err != nil { loadFailed = true retErr = err