mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 13:27:50 +08:00
commands/files: add error messages for cp paths
License: MIT Signed-off-by: Lucas Molas <schomatis@gmail.com>
This commit is contained in:
parent
a9efa7e201
commit
4334ddeb35
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user