diff --git a/src/mirall/owncloudsetupwizard.cpp b/src/mirall/owncloudsetupwizard.cpp index 84f4fa6da3..3dcfd8d98c 100644 --- a/src/mirall/owncloudsetupwizard.cpp +++ b/src/mirall/owncloudsetupwizard.cpp @@ -401,7 +401,6 @@ void OwncloudSetupWizard::slotAssistantFinished( int result ) _ocWizard->account()->deleteLater(); qDebug() << "Rejected the new config, use the old!"; } else if( result == QDialog::Accepted ) { - Account *newAccount = _ocWizard->account(); Account *origAccount = AccountManager::instance()->account(); @@ -410,6 +409,13 @@ void OwncloudSetupWizard::slotAssistantFinished( int result ) localFolder.append(QLatin1Char('/')); } + Folder *f = folderMan->folderForPath(localFolder); + if( f ) { + folderMan->setSyncEnabled(false); + folderMan->terminateSyncProcess(f->alias()); + f->journalDb()->close(); + } + bool isInitialSetup = (origAccount == 0); // check if either the account or the local folder changed, than reinit