Skip to content

Commit

Permalink
Merge pull request #134 from dmcgowan/remove-unnecessary-fs-root-check
Browse files Browse the repository at this point in the history
Remove unreachable block in fs path cleanup
  • Loading branch information
estesp authored Sep 21, 2018
2 parents 508d86a + 18a1c09 commit 7f53d41
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fs/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,6 @@ func walkLink(root, path string, linksWalked *int) (newpath string, islink bool,
if err != nil {
return "", false, err
}
if filepath.IsAbs(newpath) && strings.HasPrefix(newpath, root) {
newpath = newpath[:len(root)]
if !strings.HasPrefix(newpath, "/") {
newpath = "/" + newpath
}
}
*linksWalked++
return newpath, true, nil
}
Expand Down

0 comments on commit 7f53d41

Please sign in to comment.