Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(getLocalMeta): Use IsDelegatedTargetsManifest to filter out …
Browse files Browse the repository at this point in the history
…top metas

Signed-off-by: Baptiste Foy <[email protected]>
BaptisteFoy authored and trishankatdatadog committed Oct 12, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 32b5269 commit 7b23658
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions client/client.go
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import (
"io"

"github.com/theupdateframework/go-tuf/data"
"github.com/theupdateframework/go-tuf/internal/roles"
"github.com/theupdateframework/go-tuf/util"
"github.com/theupdateframework/go-tuf/verify"
)
@@ -425,10 +426,7 @@ func (c *Client) getLocalMeta() error {
}

for fileName := range meta {
if fileName != "targets.json" &&
fileName != "snapshot.json" &&
fileName != "root.json" &&
fileName != "timestamp.json" {
if roles.IsDelegatedTargetsManifest(fileName) {
c.localMeta[fileName] = meta[fileName]
}
}

0 comments on commit 7b23658

Please sign in to comment.