[Pkg-owncloud-commits] [owncloud-client] 149/218: FolderMan: Fix for removing a syncing folder #3843

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 17 14:31:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit c1045af500d18c52129d2a81f9ac51ec7ca92c8b
Author: Christian Kamm <mail at ckamm.de>
Date:   Fri Sep 18 14:34:01 2015 +0200

    FolderMan: Fix for removing a syncing folder #3843
    
    We can't schedule the next folder if we aren't notified that
    the removed folder has finished syncing...
---
 src/gui/folderman.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp
index f12fc88..9f4ec17 100644
--- a/src/gui/folderman.cpp
+++ b/src/gui/folderman.cpp
@@ -841,9 +841,7 @@ void FolderMan::slotRemoveFolder( Folder *f )
 
     const bool currentlyRunning = (_currentSyncFolder == f);
     if( currentlyRunning ) {
-        // let the folder delete itself when done and
         // abort the sync now
-        connect(f, SIGNAL(syncFinished(SyncResult)), f, SLOT(deleteLater()));
         terminateSyncProcess();
     }
 
@@ -858,7 +856,13 @@ void FolderMan::slotRemoveFolder( Folder *f )
     f->removeFromSettings();
 
     unloadFolder( f);
-    if( !currentlyRunning ) {
+    if( currentlyRunning ) {
+        // We want to schedule the next folder once this is done
+        connect(f, SIGNAL(syncFinished(SyncResult)),
+                SLOT(slotFolderSyncFinished(SyncResult)));
+        // Let the folder delete itself when done.
+        connect(f, SIGNAL(syncFinished(SyncResult)), f, SLOT(deleteLater()));
+    } else {
         delete f;
     }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list