Commit bde01561 authored by Matt Bell's avatar Matt Bell

core/commands2: add: Handle 'addDagnode' errors

parent 89002295
...@@ -157,9 +157,17 @@ func addDir(n *core.IpfsNode, dir cmds.File, added *AddOutput) (*dag.Node, error ...@@ -157,9 +157,17 @@ func addDir(n *core.IpfsNode, dir cmds.File, added *AddOutput) (*dag.Node, error
} }
} }
addDagnode(added, dir.FileName(), tree) err := addDagnode(added, dir.FileName(), tree)
if err != nil {
return nil, err
}
err = addNode(n, tree)
if err != nil {
return nil, err
}
return tree, addNode(n, tree) return tree, nil
} }
// addDagnode adds dagnode info to an output object // addDagnode adds dagnode info to an output object
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment