cmd/add: output file hash Fixed #239
Juan Batiz-Benet committed
Oct 30, 2014 at 06:15 UTC
b5fc3caea399a0f4ce0b000113d83bdb47502a78
1 file changed
+8
core/commands/add.go
+8
@@ -108,6 +108,14 @@ func addFile(n *core.IpfsNode, fpath string, depth int, out io.Writer) (*dag.Nod
108
log.Info("adding subblock: %s %s", l.Name, l.Hash.B58String())
109
}
110
111
+ k, err := root.Key()
112
+ if err != nil {
113
+ return nil, err
114
+ }
115
+
116
+ // output that we've added this node
117
+ fmt.Fprintf(out, "added %s %s\n", k, fpath)
118
+
119
return root, nil
120
}
121