mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merging work branch for a bug fix for bug #2379.
It closes all db connections if the new local path is a already synced folder path.
This commit is contained in:
commit
c12d3870cd
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user