If I try to transfer a file to a directory that does not exist using Camel SCP I see a warning like this in the log:
[scp] WARN scp: /home/user/scp/1234: No such file or directory
It looks like the code says that Camel will just log a warning when such an error occurs. There is no exception in the code, so it looks like the file was transferred when it was not.
The error codes for SCP are:
1 General error in file copy
2 Destination is not directory, but it should be
The fix should have the SCP Endpoint raise an error if the return code is not 0.
See the following discussion.