Skip to content

Commit 31b4cbb

Browse files
committed
Fix absolute paths when adding on Windows
License: MIT Signed-off-by: Dominic Della Valle <[email protected]>
1 parent 0bd8ced commit 31b4cbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

commands/cli/parse.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,12 @@ func appendFile(fpath string, argDef *cmds.Argument, recursive, hidden bool) (fi
397397
fpath = cwd
398398
}
399399

400-
fpath = filepath.ToSlash(filepath.Clean(fpath))
400+
fpath = filepath.Clean(fpath)
401401
fpath, err := filepath.EvalSymlinks(fpath)
402402
if err != nil {
403403
return nil, err
404404
}
405+
fpath = filepath.ToSlash(fpath)
405406
stat, err := os.Lstat(fpath)
406407
if err != nil {
407408
return nil, err

0 commit comments

Comments
 (0)