Skip to content

Commit 0c73759

Browse files
committed
fix: preserve windows file paths
This is a filepath, not a unixfs path.
1 parent 744f3b3 commit 0c73759

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/parse.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ func parseArgs(req *cmds.Request, root *cmds.Command, stdin *os.File) error {
304304
}
305305
file = files.NewWebFile(u)
306306
} else {
307-
fpath = filepath.ToSlash(filepath.Clean(fpath))
307+
fpath = filepath.Clean(fpath)
308308
derefArgs, _ := req.Options[cmds.DerefLong].(bool)
309309
var err error
310310

@@ -332,7 +332,7 @@ func parseArgs(req *cmds.Request, root *cmds.Command, stdin *os.File) error {
332332
return err
333333
}
334334

335-
fpath = path.Base(fpath)
335+
fpath = filepath.Base(fpath)
336336
file = nf
337337
}
338338

0 commit comments

Comments
 (0)