From 0c737599aa4dee2be1ffcb88692bf066b39b8700 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 26 Jul 2021 10:26:16 -0700 Subject: [PATCH] fix: preserve windows file paths This is a filepath, not a unixfs path. --- cli/parse.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/parse.go b/cli/parse.go index eebd6b43..0ebe3a8c 100644 --- a/cli/parse.go +++ b/cli/parse.go @@ -304,7 +304,7 @@ func parseArgs(req *cmds.Request, root *cmds.Command, stdin *os.File) error { } file = files.NewWebFile(u) } else { - fpath = filepath.ToSlash(filepath.Clean(fpath)) + fpath = filepath.Clean(fpath) derefArgs, _ := req.Options[cmds.DerefLong].(bool) var err error @@ -332,7 +332,7 @@ func parseArgs(req *cmds.Request, root *cmds.Command, stdin *os.File) error { return err } - fpath = path.Base(fpath) + fpath = filepath.Base(fpath) file = nf }