Commit d3bd6b1a authored by Jakub Sztandera's avatar Jakub Sztandera Committed by Jeromy Johnson

Resolve symlink if it is directly referenced in cli (#2897)

* Resolve symlink if it is directly referenced in cli

test: Directly referenced symlink should be resolved

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protonmail.ch>

* sharness: add test for symlink in the middle

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protonmail.ch>
parent 6a1d00a2
......@@ -388,7 +388,10 @@ func appendFile(fpath string, argDef *cmds.Argument, recursive, hidden bool) (fi
}
fpath = filepath.ToSlash(filepath.Clean(fpath))
fpath, err := filepath.EvalSymlinks(fpath)
if err != nil {
return nil, err
}
stat, err := os.Lstat(fpath)
if err != nil {
return nil, err
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment