Commit 6a504122 authored by Jeromy Johnson's avatar Jeromy Johnson Committed by GitHub

Merge pull request #3135 from ipfs/kevina/2839directfix

Directly Fix #2839
parents 121e486d 1888eb5d
...@@ -401,16 +401,14 @@ func appendFile(fpath string, argDef *cmds.Argument, recursive, hidden bool) (fi ...@@ -401,16 +401,14 @@ func appendFile(fpath string, argDef *cmds.Argument, recursive, hidden bool) (fi
if err != nil { if err != nil {
return nil, err return nil, err
} }
fpath = cwd cwd, err = filepath.EvalSymlinks(cwd)
}
fpath = filepath.Clean(fpath)
fpath, err := filepath.EvalSymlinks(fpath)
if err != nil { if err != nil {
return nil, err return nil, err
} }
// Repeat ToSlash after EvalSymlinks as it turns path to platform specific fpath = cwd
fpath = filepath.ToSlash(fpath) }
fpath = filepath.ToSlash(filepath.Clean(fpath))
stat, err := os.Lstat(fpath) stat, err := os.Lstat(fpath)
if err != nil { if err != nil {
......
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