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

fix: non unixfs on files #1115

Merged
merged 3 commits into from
Aug 16, 2019
Merged

fix: non unixfs on files #1115

merged 3 commits into from
Aug 16, 2019

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Aug 16, 2019

Closes #1095.

Clicking on the item goes to to the explore section:

image

It has less ctx menu opts:

image

If the user tries to navigate to it anyway (though the URL or sth):

image

License: MIT
Signed-off-by: Henrique Dias <[email protected]>
@hacdias hacdias requested review from olizilla, lidel and fsdiogo August 16, 2019 13:43
License: MIT
Signed-off-by: Henrique Dias <[email protected]>
@hacdias hacdias force-pushed the fix/non-unixfs-on-files branch from 010e190 to b576f1b Compare August 16, 2019 14:11
@hacdias hacdias requested a review from fsdiogo August 16, 2019 14:12
Copy link
Contributor

@fsdiogo fsdiogo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@hacdias hacdias merged commit 4e9ee1f into master Aug 16, 2019
@hacdias hacdias deleted the fix/non-unixfs-on-files branch August 16, 2019 14:42
const stats = await ipfs.files.stat(path)
return stats
} catch (e) {
if (e.toString().toLowerCase().includes('unixfs')) {
Copy link
Member

Choose a reason for hiding this comment

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

This turned out to not be robust enough.

I have old repo with various weird stuff in it and it breaks the pin screen due to error messages without unixfs:

unhandled-errors-2019-08-20--16-32-16

I proposed a robust fix in #1121

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.

Files/Explore: unrecognized node type when DAG is not unixfs
3 participants