mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 23:30:55 +03:00
fix the fix for #90 - need to statExistence of targetCwd not cwd
This commit is contained in:
@@ -41,8 +41,8 @@ public class StatefulSFTPClient
|
||||
public synchronized void cd(String dirname)
|
||||
throws IOException {
|
||||
final String targetCwd = cwdify(dirname);
|
||||
if (statExistence(cwd) == null) {
|
||||
throw new SFTPException(cwd + ": does not exist");
|
||||
if (statExistence(targetCwd) == null) {
|
||||
throw new SFTPException(targetCwd + ": does not exist");
|
||||
}
|
||||
cwd = targetCwd;
|
||||
log.debug("CWD = {}", cwd);
|
||||
|
||||
Reference in New Issue
Block a user