Commit 4334ddeb authored by Lucas Molas's avatar Lucas Molas

commands/files: add error messages for `cp` paths

License: MIT
Signed-off-by: default avatarLucas Molas <schomatis@gmail.com>
parent a9efa7e2
......@@ -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
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment