SFTP to non-existing folder swallows error reason
- Dominant language
- Java
- Stars
- 2.7k
- Forks
- 620
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 11
Description
If I use SFTP to upload a file to a folder which does not exists (sshClient.newSFTPClient().getFileTransfer().upload(localFile, "/tmp/does_not_exists/"), I receive an SFTPException with as message 'Failure'.
Using a debugger, I see a correct SFTPException being create twice (once for SFTPFiletransfer$Uploader.isDirectory(), once for SFTPFiletransfer$Uploader.prepareFile()) and both times being swallowed.
The exception passed through to the user program comes from SFTPEngine.open(), and that eventually creates an SFTPException from StausCode.Failure , leaving the user program with no clue what happened.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.