Blob Blame History Raw
From fae9b31c270adfe867365b1908dc9888fdb00fd1 Mon Sep 17 00:00:00 2001
From: David Rosca <nowrep@gmail.com>
Date: Mon, 12 Jan 2015 15:04:40 +0100
Subject: [PATCH 18/20] kio_obexftp: Fix finished() called twice in get()

This fixes eg. loading images from obexftp in gwenview
---
 src/kio/obexftp/kio_obexftp.cpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/kio/obexftp/kio_obexftp.cpp b/src/kio/obexftp/kio_obexftp.cpp
index 0783662..82ce5cd 100644
--- a/src/kio/obexftp/kio_obexftp.cpp
+++ b/src/kio/obexftp/kio_obexftp.cpp
@@ -195,6 +195,7 @@ void KioFtp::copy(const KUrl &src, const KUrl &dest, int permissions, KIO::JobFl
     kDebug() << "copy: " << src.url() << " to " << dest.url();
 
     copyHelper(src, dest);
+    finished();
 }
 
 void KioFtp::rename(const KUrl& src, const KUrl& dest, KIO::JobFlags flags)
@@ -342,8 +343,6 @@ void KioFtp::copyWithinObexftp(const KUrl &src, const KUrl &dest)
     if (!copyFile(src.path(), dest.path())) {
         return;
     }
-
-    finished();
 }
 
 void KioFtp::copyFromObexftp(const KUrl& src, const KUrl& dest)
@@ -362,8 +361,6 @@ void KioFtp::copyFromObexftp(const KUrl& src, const KUrl& dest)
 
     TransferFileJob *getFile = new TransferFileJob(dbusPath, this);
     getFile->exec();
-
-    finished();
 }
 
 void KioFtp::copyToObexftp(const KUrl& src, const KUrl& dest)
@@ -382,8 +379,6 @@ void KioFtp::copyToObexftp(const KUrl& src, const KUrl& dest)
 
     TransferFileJob *putFile = new TransferFileJob(dbusPath, this);
     putFile->exec();
-
-    finished();
 }
 
 void KioFtp::statHelper(const KUrl& url)
-- 
2.1.0