Skip to content

Commit

Permalink
fix: ensure parent folder symlinks are resolved (#1603)
Browse files Browse the repository at this point in the history
  • Loading branch information
didroe committed May 17, 2024
1 parent 44d807e commit 0edcb02
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/util/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,12 @@ func IsDir(path string) bool {
}

func CanonicalPath(path string) (string, error) {
resolvedPath, err := filepath.EvalSymlinks(path)
absolutePath, err := filepath.Abs(path)
if err != nil {
return "", err
}

resolvedPath, err := filepath.EvalSymlinks(absolutePath)
if err != nil {
return "", err
}
Expand Down

0 comments on commit 0edcb02

Please sign in to comment.