Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
fixup! fix: improved error message on broken CIDv0
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Dec 2, 2020
1 parent 1164748 commit bfc027d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion path.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func SplitAbsPath(fpath Path) (cid.Cid, []string, error) {
func decodeCid(cstr string) (cid.Cid, error) {
c, err := cid.Decode(cstr)
if err != nil && len(cstr) == 46 && cstr[:2] == "qm" { // https://github.com/ipfs/go-ipfs/issues/7792
return cid.Cid{}, fmt.Errorf("%v: This looks like a CIDv0 that has been lowercased; consider converting to a case-agnostic CIDv1, such as base32", err)
return cid.Cid{}, fmt.Errorf("%v: possible lowercased CIDv0; consider converting to a case-agnostic CIDv1, such as base32", err)
}
return c, err
}

0 comments on commit bfc027d

Please sign in to comment.