Skip to content

Commit

Permalink
Stop resolving symlink in containWithRoot
Browse files Browse the repository at this point in the history
Signed-off-by: Darren Stahl <darst@microsoft.com>
  • Loading branch information
darstahl committed May 9, 2018
1 parent 7a71e24 commit 5633c24
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,13 +608,6 @@ func (c *context) contain(p string) (string, error) {
// instead of contain. This is needed for Walk, as if context root is a symlink,
// it must be evaluated prior to the Walk
func (c *context) containWithRoot(p string, root string) (string, error) {
fi, err := c.driver.Lstat(root)
if err == nil && fi.Mode()&os.ModeSymlink != 0 {
root, err = c.driver.Readlink(root)
if err != nil {
return "", err
}
}
sanitized, err := c.pathDriver.Rel(root, p)
if err != nil {
return "", err
Expand Down

0 comments on commit 5633c24

Please sign in to comment.