Skip to content

Commit

Permalink
Merge pull request #4809 from djdv/fix/get/outpath
Browse files Browse the repository at this point in the history
Fix get output path
  • Loading branch information
whyrusleeping committed Mar 23, 2018
2 parents e99b91a + dcd7e6c commit aaf6ee7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/commands/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"io"
"os"
gopath "path"
"path/filepath"
"strings"

core "github.com/ipfs/go-ipfs/core"
Expand Down Expand Up @@ -183,8 +183,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
}
Expand Down

0 comments on commit aaf6ee7

Please sign in to comment.