Skip to content

Commit

Permalink
fix more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Aug 21, 2023
1 parent 5a6a27b commit 5b19227
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/commands/cmdutils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cmdutils

import (
"fmt"
"strings"

cmds "github.com/ipfs/go-ipfs-cmds"

Expand Down Expand Up @@ -59,11 +58,8 @@ func PathOrCidPath(str string) (path.Path, error) {
return p, nil
}

str = strings.TrimPrefix(str, "/")
str = strings.TrimSuffix(str, "/")

if cid, err := cid.Decode(str); err == nil {
return path.NewIPFSPath(cid), nil
if p, err := path.NewPath("/ipfs/" + str); err == nil {
return p, nil
}

// Send back original err.
Expand Down

0 comments on commit 5b19227

Please sign in to comment.