Skip to content

Conversation

artembilan
Copy link
Member

Fixes #3962

Turns out the SftpClient.CopyMode options are supported only starting SFTP v5

  • Check for the version from the client and fallback to the logic we had before with JSsch: try to rename, delete existing file if such an exception status is thrown and retry to rename

Fixes spring-projects#3962

Turns out the `SftpClient.CopyMode` options are supported only starting SFTP v5

* Check for the version from the client and fallback to the logic we had before with JSsch:
try to rename, delete existing file if such an exception status is thrown and retry to rename
@garyrussell garyrussell merged commit d38e0d8 into spring-projects:main Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SftpSession#rename(String,String) using hard coded SftpClient.CopyMode.Overwrite flag

2 participants