Summary: | cancel button in file exists dialog doesn't work | ||
---|---|---|---|
Product: | [Applications] kftpgrabber | Reporter: | IgnorantGuru <jgj7.kde> |
Component: | general | Assignee: | Jernej Kos <kostko> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
IgnorantGuru
2007-03-30 03:27:54 UTC
The first mentioned problem will be fixed ASAP - pressing cancel will now abort any currently running transfers. Can you elaborate on the second problem ? If I try to upload some files, KFTPgrabber doesn't fetch the directory listing after every uploaded file: [13:04:38] *** Uploading file 'calamar_031.zip'... [13:04:38] SIZE /test/cache/calamar_031.zip [13:04:38] 550 /test/cache/calamar_031.zip: No such file or directory [13:04:38] TYPE I [13:04:38] 200 Type set to I [13:04:38] EPSV [13:04:38] 229 Entering Extended Passive Mode (|||2679|) [13:04:38] *** Establishing data connection with 192.168.0.1:2679... [13:04:38] *** Data connection established. [13:04:38] STOR calamar_031.zip [13:04:38] 150 Opening BINARY mode data connection for calamar_031.zip [13:04:39] 226 Transfer complete. [13:04:39] *** Transfer completed. [13:04:39] *** Uploading file 'ls-lR.gz'... [13:04:39] SIZE /test/cache/ls-lR.gz [13:04:39] 550 /test/cache/ls-lR.gz: No such file or directory [13:04:39] TYPE I [13:04:39] 200 Type set to I [13:04:39] EPSV [13:04:39] 229 Entering Extended Passive Mode (|||1516|) [13:04:39] *** Establishing data connection with 192.168.0.1:1516... [13:04:39] *** Data connection established. [13:04:39] STOR ls-lR.gz [13:04:39] 150 Opening BINARY mode data connection for ls-lR.gz [13:04:41] 226 Transfer complete. [13:04:41] *** Transfer completed. How can I reproduce the caching problem you mention and attach some information from the log ? Oh and please open another bug report for the second problem and post any relevant information mentioned in comment #1 there. SVN commit 649231 by kostko: Pressing "cancel" on the "file already exists" dialog now aborts the transfer. BUG: 143617 M +13 -0 engine/thread.cpp M +1 -1 engine/thread.h M +11 -2 kftpqueue.cpp M +2 -1 kftptransferfile.cpp --- trunk/extragear/network/kftpgrabber/src/engine/thread.cpp #649230:649231 @@ -185,6 +185,19 @@ m_wakeUpPending = true; } +void Thread::abort() +{ + // Clear any pending wakeup events + if (m_wakeUpPending) { + QMutexLocker locker(&m_wakeupMutex); + + m_wakeupEvent = 0; + m_wakeUpPending = false; + } + + m_socket->protoAbort(); +} + void Thread::event(Event::Type type, QValueList<EventParameter> params) { if (m_eventHandler) { --- trunk/extragear/network/kftpgrabber/src/engine/thread.h #649230:649231 @@ -92,7 +92,7 @@ */ void wakeup(WakeupEvent *event); - void abort() { m_socket->protoAbort(); } + void abort(); void connect(const KURL &url); void disconnect(); void list(const KURL &url); --- trunk/extragear/network/kftpgrabber/src/kftpqueue.cpp #649230:649231 @@ -691,9 +691,18 @@ event->newFileName = newDestPath; break; } + case KIO::R_CANCEL: { + // Abort queue processing + Manager::self()->abort(); + transfer->parentObject()->abort(); + + // An event is not required, since we will not be recalling the process + delete event; + event = 0; + break; + } case KIO::R_AUTO_SKIP: Manager::self()->setDefaultFileExistsAction(FE_SKIP_ACT); - case KIO::R_SKIP: - case KIO::R_CANCEL: event->action = FileExistsWakeupEvent::Skip; break; + case KIO::R_SKIP: event->action = FileExistsWakeupEvent::Skip; break; case KIO::R_RESUME_ALL: Manager::self()->setDefaultFileExistsAction(FE_RESUME_ACT); case KIO::R_RESUME: event->action = FileExistsWakeupEvent::Resume; break; case KIO::R_OVERWRITE_ALL: Manager::self()->setDefaultFileExistsAction(FE_OVERWRITE_ACT); --- trunk/extragear/network/kftpgrabber/src/kftptransferfile.cpp #649230:649231 @@ -258,7 +258,8 @@ DirectoryListing list = event->getParameter(0).asDirectoryListing(); FileExistsWakeupEvent *event = Manager::fileExistsAction(this, list.list()); - remoteConnection()->getClient()->wakeup(event); + if (event) + remoteConnection()->getClient()->wakeup(event); break; } default: break; Thanks for the quick response. I have posted the second problem here... http://bugs.kde.org/show_bug.cgi?id=143744 |