Skip to content
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

Merged
merged 2 commits into from
Oct 30, 2018
Merged

Conversation

Stebalien
Copy link
Member

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.

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>
@ghost ghost assigned Stebalien Oct 30, 2018
@ghost ghost added the status/in-progress In progress label Oct 30, 2018
@Stebalien
Copy link
Member Author

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).

@@ -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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

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

Copy link
Member Author

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>
@Stebalien Stebalien merged commit d5c8fa5 into master Oct 30, 2018
@ghost ghost removed the status/in-progress In progress label Oct 30, 2018
@Stebalien Stebalien deleted the fix/resolve-non-terminal branch February 28, 2019 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants