Hi,
Recently, for one of our customer's SFTP host, although connection is made, chdir() is occurring "2 No such file". FYI, dir() looks good. Also put() in the root directory works fine. I can manually access the host and change directory. Please let me know the root cause.
String[] dirs = thisClient.dir();
if ( dirs != null )
{
for (String s: dirs )
System.out.println("1 - thisClient.connected() = " + thisClient.connected() + ", dir = " + s);
}
System.out.println("2 - thisClient.connected() = " + thisClient.connected() + ", args=" + ((String) args[0]));
try
{
thisClient.chdir((String)args[0]);
System.out.println("3 - thisClient.connected() = " + thisClient.connected() + ", args=" + ((String) args[0]));
}
catch (Exception ex1)
{
System.out.println("4 - thisClient.connected() = " + thisClient.connected() + ", args=" + ((String) args[0])
+ ", ex1.getCause=" + ex1.getCause() + ", ex1.message=" + ex1) ;
}
1 - thisClient.connected() = true, dir = test1
1 - thisClient.connected() = true, dir = test2
2 - thisClient.connected() = true, args=test1
4 - thisClient.connected() = true, args=test1, ex1.getCause=null, ex1.message=com.enterprisedt.net.ftp.FTPException: 2 No such file
Thanks,
SS