sshtools / j2ssh-maverick

The open source branch of our legacy API providing a robust, mission critical SSH component to the community.
GNU Lesser General Public License v3.0
63 stars 33 forks source link

SftpClient.pwd() is returning incorrect results for windows #22

Open ilapavuluri opened 1 year ago

ilapavuluri commented 1 year ago

Hi Team,

I am using maverick-legacy-client 1.7.14 licensed version.

in my code:

"SftpClient.copyRemoteDirectory(rfdir,lfdir,true,false,true,null);" throwing below exception, this is because the SftpClient.pwd() is returning incorrect path, the path is coming with a forward slash as a prefix (eg: /C:/Users/Username/). This is happening only for windows for linux it is working fine.

appriciate your help, since we are licensed customers, please let me know where I can raise a support ticket.

2023-10-18 16:00:59,326 WARN [com.optinuity.c2o.proxyagt.SshProcessMgr] [ Thread-47] CachedSshClient 2 - No such file com.maverick.sftp.SftpSubsystemChannel.extractAttributes(SftpSubsystemChannel.java:2365) com.maverick.sftp.SftpSubsystemChannel.getAttributes(SftpSubsystemChannel.java:2347) com.maverick.sftp.SftpSubsystemChannel.getAttributes(SftpSubsystemChannel.java:2299) com.sshtools.sftp.SftpClient.cd(SftpClient.java:542) com.sshtools.sftp.SftpClient.copyRemoteDirectory(SftpClient.java:2844) com.optinuity.c2o.proxyagt.CachedSshClient.recursiveGetDir(CachedSshClient.java:847) com.optinuity.c2o.servicegroup.process.MonitoredSshProcess.recoverProcResults(MonitoredSshProcess.java:567) com.optinuity.c2o.servicegroup.process.MonitoredSshProcess.run(MonitoredSshProcess.java:1019) java.lang.Thread.run(Thread.java:748)