commit 29e0827b52083e1ec1ed913164940a0012681172
parent 4865beea5cf0ccce4f709d9393e9e3076487063c
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Sat, 19 Mar 2016 22:28:23 +0100
Write passwordstore into file also after account passwords migration.
Diffstat:
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/prefs_account.c b/src/prefs_account.c
@@ -3597,25 +3597,36 @@ void prefs_account_read_config(PrefsAccount *ac_prefs, const gchar *label)
privacy_prefs = NULL;
}
+ gboolean passwords_migrated = FALSE;
+
if (ac_prefs->passwd != NULL && strlen(ac_prefs->passwd) > 1) {
passwd_store_set_account(ac_prefs->account_id,
PWS_ACCOUNT_RECV, ac_prefs->passwd, TRUE);
+ passwords_migrated = TRUE;
}
if (ac_prefs->smtp_passwd != NULL && strlen(ac_prefs->smtp_passwd) > 1) {
passwd_store_set_account(ac_prefs->account_id,
PWS_ACCOUNT_SEND, ac_prefs->smtp_passwd, TRUE);
+ passwords_migrated = TRUE;
}
if (ac_prefs->in_ssl_client_cert_pass != NULL
&& strlen(ac_prefs->in_ssl_client_cert_pass) > 1) {
passwd_store_set_account(ac_prefs->account_id,
PWS_ACCOUNT_RECV_CERT, ac_prefs->in_ssl_client_cert_pass, TRUE);
+ passwords_migrated = TRUE;
}
if (ac_prefs->out_ssl_client_cert_pass != NULL
&& strlen(ac_prefs->out_ssl_client_cert_pass) > 1) {
passwd_store_set_account(ac_prefs->account_id,
PWS_ACCOUNT_SEND_CERT, ac_prefs->out_ssl_client_cert_pass, TRUE);
+ passwords_migrated = TRUE;
}
+ /* Write out password store to file immediately after their move
+ * from accountrc there. */
+ if (passwords_migrated)
+ passwd_store_write_config();
+
ac_prefs->receive_in_progress = FALSE;
prefs_custom_header_read_config(ac_prefs);