Skip to content

Commit

Permalink
fix(localMeta): Remove unnecessary calls to getDelegationPathFromRaw
Browse files Browse the repository at this point in the history
Signed-off-by: Baptiste Foy <baptiste.foy@datadoghq.com>
  • Loading branch information
BaptisteFoy committed Jan 6, 2023
1 parent 7d88769 commit 367fe61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 367fe61

Please sign in to comment.