Skip to content

Commit

Permalink
Use getFollowLinksWalked
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
  • Loading branch information
aaronlehmann committed Sep 8, 2021
1 parent 98f54ff commit e9e6cec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cache/contenthash/checksum.go
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,8 @@ func wildcardPrefix(root *iradix.Node, p string) (string, []byte, bool, error) {
return "", nil, false, nil
}

k, cr, err := getFollowLinks(root, convertPathToKey([]byte(d1)), true)
linksWalked := 0
k, cr, err := getFollowLinksWalk(root, convertPathToKey([]byte(d1)), true, &linksWalked)
if err != nil {
return "", k, false, err
}
Expand All @@ -704,7 +705,6 @@ func wildcardPrefix(root *iradix.Node, p string) (string, []byte, bool, error) {
// getFollowLinks only handles symlinks in path
// components before the last component, so
// handle last component in d1 specially.
linksWalked := 0
resolved := string(convertKeyToPath(k))
for {
v, ok := root.Get(k)
Expand Down

0 comments on commit e9e6cec

Please sign in to comment.