Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2022-04-05 14:52:01 +0300
committerHannah von Reth <vonreth@kde.org>2022-04-05 15:24:33 +0300
commit140ea8646f98ef6d43d178b5a7d6729452883c5d (patch)
treec5d50d22603c96fc8e77b6e9ad2bf8124908c89f /src/gui/owncloudgui.cpp
parentbfca6078482e6f74329d7fb051ca0a71609afa9f (diff)
Only save fully defined accounts
Diffstat (limited to 'src/gui/owncloudgui.cpp')
-rw-r--r--src/gui/owncloudgui.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp
index e6da1554b..635f1f93c 100644
--- a/src/gui/owncloudgui.cpp
+++ b/src/gui/owncloudgui.cpp
@@ -69,6 +69,10 @@ void setUpInitialSyncFolder(AccountStatePtr accountStatePtr)
auto validator = new ConnectionValidator(account, account.data());
QObject::connect(validator, &ConnectionValidator::connectionResult, account.data(), [accountStatePtr](ConnectionValidator::Status status, const QStringList &errors) {
if (OC_ENSURE(status == ConnectionValidator::Connected)) {
+ // saving once after adding makes sure the account is stored in the config in a working state
+ // this is needed to ensure a consistent state in the config file upon unexpected terminations of the client
+ // (for instance, when running from a debugger and stopping the process from there)
+ AccountManager::instance()->saveAccount(accountStatePtr->account().data());
QString localFolder = initLocalFolder();
auto folderMan = FolderMan::instance();
if (accountStatePtr->account()->capabilities().spacesSupport().enabled) {