diff options
author | Klaas Freitag <freitag@owncloud.com> | 2014-10-24 13:59:56 +0400 |
---|---|---|
committer | Klaas Freitag <freitag@owncloud.com> | 2014-10-24 13:59:56 +0400 |
commit | 542e9890469a8e8b0f0dadbdb974a5ace6a07045 (patch) | |
tree | 1930f325cfbcb5f17cec05b2031a261777f2bed0 /src/mirall | |
parent | f5c199740d6d792d32e476f772cfbea2394fdfa3 (diff) |
Setup Dialog: Terminate sync if the new folder is a an actual folder.
Diffstat (limited to 'src/mirall')
-rw-r--r-- | src/mirall/owncloudsetupwizard.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mirall/owncloudsetupwizard.cpp b/src/mirall/owncloudsetupwizard.cpp index 84f4fa6da..f9a721288 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,12 @@ void OwncloudSetupWizard::slotAssistantFinished( int result ) localFolder.append(QLatin1Char('/')); } + Folder *f = folderMan->folderForPath(localFolder); + if( f ) { + folderMan->setSyncEnabled(false); + folderMan->terminateSyncProcess(f->alias()); + } + bool isInitialSetup = (origAccount == 0); // check if either the account or the local folder changed, than reinit |