Skip to content

Commit

Permalink
fix(add): refer to ipfs issue #5456
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
  • Loading branch information
overbool committed Sep 17, 2018
1 parent 6aaaa76 commit 2abaff8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cli/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ const notRecursiveFmtStr = "'%s' is a directory, use the '-%s' flag to specify d
const dirNotSupportedFmtStr = "Invalid path '%s', argument '%s' does not support directories"

func appendFile(fpath string, argDef *cmdkit.Argument, recursive, hidden bool) (files.File, error) {
if fpath == "." {
fpath = filepath.ToSlash(filepath.Clean(fpath))
if fpath == "."{
cwd, err := os.Getwd()
if err != nil {
return nil, err
Expand All @@ -468,8 +469,6 @@ func appendFile(fpath string, argDef *cmdkit.Argument, recursive, hidden bool) (
fpath = cwd
}

fpath = filepath.ToSlash(filepath.Clean(fpath))

stat, err := os.Lstat(fpath)
if err != nil {
return nil, err
Expand Down

0 comments on commit 2abaff8

Please sign in to comment.