[Commits] [SCM] claws branch, master, updated. 3.13.2-81-g29e0827

ticho at claws-mail.org ticho at claws-mail.org
Sat Mar 19 22:28:52 CET 2016


The branch, master has been updated
       via  29e0827b52083e1ec1ed913164940a0012681172 (commit)
      from  4865beea5cf0ccce4f709d9393e9e3076487063c (commit)

Summary of changes:
 src/prefs_account.c |   11 +++++++++++
 1 file changed, 11 insertions(+)


- Log -----------------------------------------------------------------
commit 29e0827b52083e1ec1ed913164940a0012681172
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sat Mar 19 22:28:23 2016 +0100

    Write passwordstore into file also after account passwords migration.

diff --git a/src/prefs_account.c b/src/prefs_account.c
index f31db87..31c0d6f 100644
--- 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);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list