mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-06 19:44:01 +08:00
Fix dot path parsing on Windows
License: MIT Signed-off-by: Dominic Della Valle <ddvpublic@gmail.com>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user