add: only show added once.
Juan Batiz-Benet committed
Oct 4, 2014 at 03:56 UTC
ee1d1ac0786178f9728bc3fccc1175effc0c760b
1 file changed
+8
-7
core/commands/add.go
+8
-7
@@ -36,7 +36,7 @@ func Add(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Wr
36
}
37
38
// Add the file
39
- nd, err := AddPath(n, path, depth)
39
+ _, err = AddPath(n, path, depth)
40
if err != nil {
41
if err == ErrDepthLimitExceeded && depth == 1 {
42
err = errors.New("use -r to recursively add directories")
@@ -45,12 +45,13 @@ func Add(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Wr
45
}
46
47
// get the key to print it
48
- k, err := nd.Key()
49
- if err != nil {
50
- return fmt.Errorf("addFile error: %v", err)
51
- }
52
-
53
- fmt.Fprintf(out, "added %s %s\n", k.Pretty(), path)
48
+ // k, err := nd.Key()
49
+ // if err != nil {
50
+ // return fmt.Errorf("addFile error: %v", err)
51
+ // }
52
+ //
53
+ // Commenting out of here, because it's already in addNode below.
54
+ // fmt.Fprintf(out, "added %s %s\n", k.Pretty(), path)
55
}
56
return nil
57
}