mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-09 19:32:24 +08:00
@ -6,7 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
gopath "path"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
core "github.com/ipfs/go-ipfs/core"
|
core "github.com/ipfs/go-ipfs/core"
|
||||||
@ -183,8 +183,8 @@ func getOutPath(req *cmds.Request) string {
|
|||||||
outPath, _ := req.Options["output"].(string)
|
outPath, _ := req.Options["output"].(string)
|
||||||
if outPath == "" {
|
if outPath == "" {
|
||||||
trimmed := strings.TrimRight(req.Arguments[0], "/")
|
trimmed := strings.TrimRight(req.Arguments[0], "/")
|
||||||
_, outPath = gopath.Split(trimmed)
|
_, outPath = filepath.Split(trimmed)
|
||||||
outPath = gopath.Clean(outPath)
|
outPath = filepath.Clean(outPath)
|
||||||
}
|
}
|
||||||
return outPath
|
return outPath
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user