diff --git a/src/gui/owncloudsetupwizard.cpp b/src/gui/owncloudsetupwizard.cpp index 5b36e44c2..2eb7ed37c 100644 --- a/src/gui/owncloudsetupwizard.cpp +++ b/src/gui/owncloudsetupwizard.cpp @@ -553,6 +553,13 @@ void OwncloudSetupWizard::slotSkipFolderConfiguration() AccountState *OwncloudSetupWizard::applyAccountChanges() { AccountPtr newAccount = _ocWizard->account(); + + // Detach the account that is going to be saved from the + // wizard to ensure it doesn't accidentally get modified + // later (such as from running cleanup such as + // AbstractCredentialsWizardPage::cleanupPage()) + _ocWizard->setAccount(AccountManager::createAccount()); + auto manager = AccountManager::instance(); auto newState = manager->addAccount(newAccount);