-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Out of range in ipfs add #2506
Out of range in ipfs add #2506
Conversation
@@ -181,7 +178,7 @@ func (adder *Adder) Finalize() (*dag.Node, error) { | |||
} | |||
|
|||
var name string | |||
if !adder.Wrap { | |||
if !adder.Wrap && len(root.Links) == 1 { |
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.
This is the fix.
Good catch, Do you think you could add a sharness test for this somewhere? maybe in |
Will do |
@MichaelMure the codepath youre toching in the PR has changed. Can you rerun your repro and see if this issue still occurs on master? |
License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>
License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>
License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>
aea496d
to
954c968
Compare
I don't think the bugfix here is relevant any longer, but the documentation would be nice. |
Closing due to inactivity, please reopen as needed. |
I triggered an out of range in coreunix/add.go when adding a file through the API (I accidentally made a POST query without an actual file content).
Fixed it and documented/cleaned the code in the process.