Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
ee1d1ac0
Commit
ee1d1ac0
authored
10 years ago
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: only show added once.
parent
0c8ae767
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
core/commands/add.go
core/commands/add.go
+8
-7
No files found.
core/commands/add.go
View file @
ee1d1ac0
...
...
@@ -36,7 +36,7 @@ func Add(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Wr
}
// Add the file
nd
,
err
:
=
AddPath
(
n
,
path
,
depth
)
_
,
err
=
AddPath
(
n
,
path
,
depth
)
if
err
!=
nil
{
if
err
==
ErrDepthLimitExceeded
&&
depth
==
1
{
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
}
// get the key to print it
k
,
err
:=
nd
.
Key
()
if
err
!=
nil
{
return
fmt
.
Errorf
(
"addFile error: %v"
,
err
)
}
fmt
.
Fprintf
(
out
,
"added %s %s
\n
"
,
k
.
Pretty
(),
path
)
// k, err := nd.Key()
// if err != nil {
// return fmt.Errorf("addFile error: %v", err)
// }
//
// Commenting out of here, because it's already in addNode below.
// fmt.Fprintf(out, "added %s %s\n", k.Pretty(), path)
}
return
nil
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment