Merge pull request #3023 from ipfs/feature/eval-symlink-windows

cli: do ToSlash after EvalSymlinks to remove platform specific slashes
This commit is contained in:
Jeromy Johnson 2016-08-03 06:29:54 -07:00 committed by GitHub
commit 16c5a89dd4

View File

@ -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