| Summary: | infinity recursive CWD in FXP transfer | ||
|---|---|---|---|
| Product: | [Unmaintained] kftpgrabber | Reporter: | Nomadic <nomadeku> |
| Component: | general | Assignee: | Jernej Kos <kostko> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed In: | ||
| Sentry Crash Report: | |||
|
Description
Nomadic
2007-05-03 17:06:38 UTC
oops...
>> By transfer on local side this dir - all ОК
on local transfer bug also present.....
SVN commit 660745 by kostko:
Fixed infinite recursion in CWD command. Note that this can't go to trunk because trunk will be KDE4-only in just a moment.
BUG: 144989
M +9 -0 ftpsocket.cpp
--- branches/kftpgrabber/0.8/src/engine/ftpsocket.cpp #660744: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;
|