Skip to content

Commit 5633c24

Browse files
committed
Stop resolving symlink in containWithRoot
Signed-off-by: Darren Stahl <[email protected]>
1 parent 7a71e24 commit 5633c24

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

context.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -608,13 +608,6 @@ func (c *context) contain(p string) (string, error) {
608608
// instead of contain. This is needed for Walk, as if context root is a symlink,
609609
// it must be evaluated prior to the Walk
610610
func (c *context) containWithRoot(p string, root string) (string, error) {
611-
fi, err := c.driver.Lstat(root)
612-
if err == nil && fi.Mode()&os.ModeSymlink != 0 {
613-
root, err = c.driver.Readlink(root)
614-
if err != nil {
615-
return "", err
616-
}
617-
}
618611
sanitized, err := c.pathDriver.Rel(root, p)
619612
if err != nil {
620613
return "", err

0 commit comments

Comments
 (0)