Files
spring-integration/spring-integration-sftp
Artem Bilan 8b88668fbe GH-9114: SFTP: Use canonicalPath exists operation
Fixes: #9114

If path is not in normalized presentation, the SFTP operation might fail like:
```
Caused by: SFTP error (SSH_FX_NO_SUCH_PATH): The file path does not exist or is invalid.
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.throwStatusException(AbstractSftpClient.java:277)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkAttributesResponse(AbstractSftpClient.java:333)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkAttributes(AbstractSftpClient.java:325)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.lstat(AbstractSftpClient.java:1010)
at org.springframework.integration.sftp.session.SftpSession.exists(SftpSession.java:191)
```

* Use it now like this `this.sftpClient.lstat(normalizePath(path))`

**Auto-cherry-pick to `6.2.x` & `6.1.x`**
2024-05-07 14:23:17 -04:00
..
2016-05-03 11:55:55 -04:00