files cp: wrap flush error

License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
This commit is contained in:
Lucas Molas 2018-09-17 21:14:42 -03:00
parent 2dca8c2f96
commit 7994689516

View File

@ -344,7 +344,7 @@ var filesCpCmd = &oldcmds.Command{
if flush {
err := mfs.FlushPath(node.FilesRoot, dst)
if err != nil {
res.SetError(err, cmdkit.ErrNormal)
res.SetError(fmt.Errorf("cp: cannot flush the created file %s: %s", dst, err), cmdkit.ErrNormal)
return
}
}