mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-28 13:57:52 +08:00
Merge pull request #2614 from djdv/windotdir
Fix dot path parsing on Windows
This commit is contained in:
commit
e124ee23a3
@ -405,8 +405,6 @@ 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 *cmds.Argument, recursive, hidden bool) (files.File, error) {
|
||||
fpath = filepath.ToSlash(filepath.Clean(fpath))
|
||||
|
||||
if fpath == "." {
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
@ -415,6 +413,8 @@ func appendFile(fpath string, argDef *cmds.Argument, recursive, hidden bool) (fi
|
||||
fpath = cwd
|
||||
}
|
||||
|
||||
fpath = filepath.ToSlash(filepath.Clean(fpath))
|
||||
|
||||
stat, err := os.Lstat(fpath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Loading…
Reference in New Issue
Block a user