mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-01 22:37:51 +08:00
Fix get output path
Minor but important change for platform native output paths License: MIT Signed-off-by: Dominic Della Valle <ddvpublic@gmail.com>
This commit is contained in:
parent
5622cc5bb3
commit
dcd7e6c187
@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
gopath "path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
core "github.com/ipfs/go-ipfs/core"
|
||||
@ -187,8 +187,8 @@ func getOutPath(req *cmds.Request) string {
|
||||
outPath, _ := req.Options["output"].(string)
|
||||
if outPath == "" {
|
||||
trimmed := strings.TrimRight(req.Arguments[0], "/")
|
||||
_, outPath = gopath.Split(trimmed)
|
||||
outPath = gopath.Clean(outPath)
|
||||
_, outPath = filepath.Split(trimmed)
|
||||
outPath = filepath.Clean(outPath)
|
||||
}
|
||||
return outPath
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user