Skip to content

Commit

Permalink
cmd/add: output file hash Fixed #239
Browse files Browse the repository at this point in the history
  • Loading branch information
jbenet committed Oct 30, 2014
1 parent 70e1f9b commit b5fc3ca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ func addFile(n *core.IpfsNode, fpath string, depth int, out io.Writer) (*dag.Nod
log.Info("adding subblock: %s %s", l.Name, l.Hash.B58String())
}

k, err := root.Key()
if err != nil {
return nil, err
}

// output that we've added this node
fmt.Fprintf(out, "added %s %s\n", k, fpath)

return root, nil
}

Expand Down

0 comments on commit b5fc3ca

Please sign in to comment.