--- kftpgrabber/src/engine/ftpsocket.cpp 2007/04/29 10:50:17 659051 +++ kftpgrabber/src/engine/ftpsocket.cpp 2007/05/03 15:56:28 660745 @@ -1247,6 +1247,12 @@ break; } case SentCwd: { + if (!socket()->getConfigInt("status.cwd")) { + // Change directory has failed and we should be silent (=error reporting is off) + socket()->resetCommandClass(); + return; + } + // Check the directory listing cache DirectoryListing cached = Cache::self()->findCached(socket(), socket()->getCurrentDirectory()); if (cached.isValid()) { @@ -1560,6 +1566,7 @@ switch (currentState) { case None: { targetDirectory = socket()->getConfig("params.cwd.path"); + socket()->setConfig("status.cwd", 1); // If we are already there, no need to CWD if (socket()->getCurrentDirectory() == targetDirectory) { @@ -1608,6 +1615,7 @@ socket()->emitError(socket()->getPreviousCommand() == Commands::CmdList ? ListFailed : FileNotFound); socket()->resetCommandClass(Failed); } else { + socket()->setConfig("status.cwd", 0); socket()->resetCommandClass(); } } @@ -1629,6 +1637,7 @@ socket()->emitError(socket()->getPreviousCommand() == Commands::CmdList ? ListFailed : FileNotFound); socket()->resetCommandClass(Failed); } else { + socket()->setConfig("status.cwd", 0); socket()->resetCommandClass(); } break;