Menu ▾ ▴

#63 SftpClient getAbsolutePath bug?

Current CVS
open
nobody
None
5
2004-06-10
2004-06-10
No

Its was my expectation that getAbsolutePath should
return the absolute path relative to the current remote
directory.

Assume pwd="/home/me" and "/home/me/foo" exists.
Then after connection :

sftpClient.cd("foo");

sftpClient.pwd() returns "/home/me/foo" .. as expected.

However,
sftpClient.getAbsolutePath(".") returns "/home/me"

The code is:
public String getAbsolutePath(String path)
throws IOException {
String actual = resolveRemotePath(path);
return sftp.getAbsolutePath(path);
}

I think it should be:
public String getAbsolutePath(String path)
throws IOException {
String actual = resolveRemotePath(path);
return sftp.getAbsolutePath(actual);
}

Reported against j2ssh-0.2.7-src.tar.gz

Discussion


Log in to post a comment.