summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-ftp/kftpgrabber/files/kftpgrabber-0.8.1-inf-recursion-fix.diff')
-rw-r--r--net-ftp/kftpgrabber/files/kftpgrabber-0.8.1-inf-recursion-fix.diff39
1 files changed, 39 insertions, 0 deletions
diff --git a/net-ftp/kftpgrabber/files/kftpgrabber-0.8.1-inf-recursion-fix.diff b/net-ftp/kftpgrabber/files/kftpgrabber-0.8.1-inf-recursion-fix.diff
new file mode 100644
index 000000000000..be19480ea522
--- /dev/null
+++ b/net-ftp/kftpgrabber/files/kftpgrabber-0.8.1-inf-recursion-fix.diff
@@ -0,0 +1,39 @@
+--- 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;