@cryptotaxi247 / kubo / commits / dcd7e6c18

Fix get output path

Minor but important change for platform native output paths License: MIT Signed-off-by: Dominic Della Valle <ddvpublic@gmail.com>

Dominic Della Valle committed Mar 12, 2018 at 10:22 UTC dcd7e6c187dde275f74b0720f1f4d318595d4acf
1 file changed +3 -3
core/commands/get.go
+3 -3
@@ -6,7 +6,7 @@ import (
6 "fmt"
7 "io"
8 "os"
9 - gopath "path"
9 + "path/filepath"
10 "strings"
11
12 core "github.com/ipfs/go-ipfs/core"
@@ -187,8 +187,8 @@ func getOutPath(req *cmds.Request) string {
187 outPath, _ := req.Options["output"].(string)
188 if outPath == "" {
189 trimmed := strings.TrimRight(req.Arguments[0], "/")
190 - _, outPath = gopath.Split(trimmed)
191 - outPath = gopath.Clean(outPath)
190 + _, outPath = filepath.Split(trimmed)
191 + outPath = filepath.Clean(outPath)
192 }
193 return outPath
194 }