Skip to content

Commit

Permalink
Evaluate symlinks in paths passed in as user arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Nov 2, 2020
1 parent 4c15e83 commit eefe880
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions filesystems.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ func findMounts(mounts []Mount, path string) ([]Mount, error) {
return nil, err
}

path, err = filepath.EvalSymlinks(path)
if err != nil {
return nil, err
}

_, err = os.Stat(path)
if err != nil {
return nil, err
Expand Down

0 comments on commit eefe880

Please sign in to comment.