Skip to content

Commit d954e86

Browse files
authored
Merge pull request #121 from overbool/fix/ipfs-#5456
fix(add): refer to ipfs issue #5456
2 parents 678a25a + dfd79a5 commit d954e86

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cli/parse.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ const notRecursiveFmtStr = "'%s' is a directory, use the '-%s' flag to specify d
456456
const dirNotSupportedFmtStr = "Invalid path '%s', argument '%s' does not support directories"
457457

458458
func appendFile(fpath string, argDef *cmdkit.Argument, recursive, hidden bool) (files.File, error) {
459+
fpath = filepath.ToSlash(filepath.Clean(fpath))
459460
if fpath == "." {
460461
cwd, err := os.Getwd()
461462
if err != nil {
@@ -468,8 +469,6 @@ func appendFile(fpath string, argDef *cmdkit.Argument, recursive, hidden bool) (
468469
fpath = cwd
469470
}
470471

471-
fpath = filepath.ToSlash(filepath.Clean(fpath))
472-
473472
stat, err := os.Lstat(fpath)
474473
if err != nil {
475474
return nil, err

0 commit comments

Comments
 (0)