mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 19:07:48 +08:00
Merge pull request #3023 from ipfs/feature/eval-symlink-windows
cli: do ToSlash after EvalSymlinks to remove platform specific slashes
This commit is contained in:
commit
16c5a89dd4
@ -397,11 +397,14 @@ func appendFile(fpath string, argDef *cmds.Argument, recursive, hidden bool) (fi
|
||||
fpath = cwd
|
||||
}
|
||||
|
||||
fpath = filepath.ToSlash(filepath.Clean(fpath))
|
||||
fpath = filepath.Clean(fpath)
|
||||
fpath, err := filepath.EvalSymlinks(fpath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Repeat ToSlash after EvalSymlinks as it turns path to platform specific
|
||||
fpath = filepath.ToSlash(fpath)
|
||||
|
||||
stat, err := os.Lstat(fpath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Loading…
Reference in New Issue
Block a user