-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error on resolving non-terminal paths #5705
Conversation
This isn't the *correct* fix but it (mostly) restores the previous behavior. Note 1: It *also* fixes resolution of `/ipld` paths by avoiding `path.FromCid`. Note 2: This does not preserve the error. That was a DagCBOR specific error that has nothing to do with the issue. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Alternative to #5704 that mostly preserves the current behavior. In retrospect, I actually prefer just breaking this now (we're not going to pass the js-ipfs-api tests either way). |
core/commands/resolve.go
Outdated
@@ -135,9 +135,11 @@ Resolve the value of an IPFS DAG path: | |||
return err | |||
} | |||
|
|||
c := rp.Cid() | |||
if rp.Remainder() != "" { | |||
return fmt.Errorf("path does not end on a dag-node boundary") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to keep the original error too because https://github.com/ipfs/interface-ipfs-core/pull/385/files#diff-8ce9a93c2e33e2c37099701b755064a3L85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. found non-link at given path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That error message is just a side-effect of DagCBOR. But yeah, we can keep it for now.
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This isn't the correct fix but it (mostly) restores the previous behavior.
Note 1: It also fixes resolution of
/ipld
paths by avoidingpath.FromCid
.Note 2: This does not preserve the error. That was a DagCBOR specific error that has nothing to do with the issue.