-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'/' is getting removed from directory path #83
Comments
@ludup @brett-smith @dandalf Could someone help me here? |
How many servers are affected by this? This is a long-standing behaviour I've not had reports about before, and this code goes back to previous generations. The furthest I can go back to is the initial commit of Maverick Legacy to private git in 2015, which still appears to do this. If I'd had a problem supporting commercial customers since that commit, there would already be a switch there. You could propose a change to implement a configuration switch. Look at AdaptiveConfiguration, While it's not used much at the moment in Synergy, the plan is to move all configurations over to using it to match the legacy API flexibility. |
With the 3.1.2-SNAPSHOT, you can -Dmaverick.disableSlashRemoval=true to remove the path processing. As stated before, this code has existed for a long time and in all the years I've supported the various APIs it has not come up as a problem before. Its inclusion would suggest my former self had good reason for doing it. You can now disable it system-wide with this system property switch. Please let us know if you encounter any problems with this switch enabled. In a future release (3.2), it will be possible to configure this per connection through the planned extension of the Adaptive configuration file. However, if you need this before you could always modify the SftpClient to have a boolean option set on individual instances. |
For one of our use case where we are trying to connect to a sftp server we can see some weird behavior. In this particular case SFTP server allows cd command only with a '/' at end
When we try calling sftpClient.cd("dirA/dirB/") it attempts to call cd dirA/dirB and fails.
We tried to look into your code and it seems like '/' is removed intentionally.
Can someone explain what is the reason for that and can we have some workaround to cd/list with '/' at the end
The text was updated successfully, but these errors were encountered: