mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
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...
This commit is contained in:
parent
c5c1a7a1c3
commit
c1045af500
1 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue