Commit 4540d3db authored by Jakub Sztandera's avatar Jakub Sztandera

cli: do ToSlash after EvalSymlinks to remove platform specific slashes

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protonmail.ch>
parent bbe17bd0
......@@ -397,11 +397,14 @@ func appendFile(fpath string, argDef *cmds.Argument, recursive, hidden bool) (fi
fpath = cwd
}
fpath = filepath.ToSlash(filepath.Clean(fpath))
fpath = filepath.Clean(fpath)
fpath, err := filepath.EvalSymlinks(fpath)
if err != nil {
return nil, err
}
// Repeat ToSlash after EvalSymlinks as it turns path to platform specific
fpath = filepath.ToSlash(fpath)
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