mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +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)
|
public synchronized void cd(String dirname)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
final String targetCwd = cwdify(dirname);
|
final String targetCwd = cwdify(dirname);
|
||||||
if (statExistence(cwd) == null) {
|
if (statExistence(targetCwd) == null) {
|
||||||
throw new SFTPException(cwd + ": does not exist");
|
throw new SFTPException(targetCwd + ": does not exist");
|
||||||
}
|
}
|
||||||
cwd = targetCwd;
|
cwd = targetCwd;
|
||||||
log.debug("CWD = {}", cwd);
|
log.debug("CWD = {}", cwd);
|
||||||
|
|||||||
Reference in New Issue
Block a user