This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: report correct size for raw dag nodes (#1591)
If you specify `cidVersion: 0`, for go compatibility you will have raw leaf nodes. If your data fits in one dag node, the root node will be a raw node for the same reason, and `ipfs.object.get` will return a buffer. This PR inspects the returned node to see if it's a buffer, if it is, use the `length` property, otherwise use the DAGNode `size` property. Fixes #1585
- Loading branch information
1 parent
542737b
commit 549f2f6
Showing
3 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters