Skip to content

Commit

Permalink
Fix absolute paths when adding on Windows
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Dominic Della Valle <ddvpublic@gmail.com>
  • Loading branch information
djdv committed Jul 31, 2016
1 parent 0bd8ced commit 31b4cbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commands/cli/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,12 @@ 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
}
fpath = filepath.ToSlash(fpath)
stat, err := os.Lstat(fpath)
if err != nil {
return nil, err
Expand Down

0 comments on commit 31b4cbb

Please sign in to comment.