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
4334ddeb
Commit
4334ddeb
authored
Jul 12, 2018
by
Lucas Molas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/files: add error messages for `cp` paths
License: MIT Signed-off-by:
Lucas Molas
<
schomatis@gmail.com
>
parent
a9efa7e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
core/commands/files.go
core/commands/files.go
+2
-2
No files found.
core/commands/files.go
View file @
4334ddeb
...
...
@@ -329,13 +329,13 @@ var filesCpCmd = &oldcmds.Command{
nd
,
err
:=
getNodeFromPath
(
req
.
Context
(),
node
,
node
.
DAG
,
src
)
if
err
!=
nil
{
res
.
SetError
(
err
,
cmdkit
.
ErrNormal
)
res
.
SetError
(
fmt
.
Errorf
(
"cp: cannot get node from path %s: %s"
,
src
,
err
)
,
cmdkit
.
ErrNormal
)
return
}
err
=
mfs
.
PutNode
(
node
.
FilesRoot
,
dst
,
nd
)
if
err
!=
nil
{
res
.
SetError
(
err
,
cmdkit
.
ErrNormal
)
res
.
SetError
(
fmt
.
Errorf
(
"cp: cannot put node in path %s: %s"
,
dst
,
err
)
,
cmdkit
.
ErrNormal
)
return
}
...
...
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