[Commits] [SCM] claws branch, master, updated. 3.16.0-20-g4d2f6d2

ticho at claws-mail.org ticho at claws-mail.org
Sat Jan 20 14:37:51 CET 2018


The branch, master has been updated
       via  4d2f6d203ee529b232c87e44d1da4779d0dc01e8 (commit)
      from  7695cfb98ef6a2c4796c9b618fbeeea4234db901 (commit)

Summary of changes:
 src/passwordstore.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 4d2f6d203ee529b232c87e44d1da4779d0dc01e8
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sat Jan 20 14:36:38 2018 +0100

    Do not consider missing passwordstorerc file as error.
    
    Just continue with empty password store.

diff --git a/src/passwordstore.c b/src/passwordstore.c
index 2f1d6c1..5709f15 100644
--- a/src/passwordstore.c
+++ b/src/passwordstore.c
@@ -419,11 +419,17 @@ int passwd_store_read_config(void)
 
 	/* TODO: passwd_store_clear(); */
 
-	debug_print("Reading password store from file...\n");
-
 	rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
 			PASSWORD_STORE_RC, NULL);
 
+	debug_print("Reading password store from file '%s'\n", rcpath);
+
+	if (!g_file_test(rcpath, G_FILE_TEST_EXISTS)) {
+		debug_print("File does not exist, looks like a new configuration.\n");
+		g_free(rcpath);
+		return 0;
+	}
+
 	if (!g_file_get_contents(rcpath, &contents, NULL, &error)) {
 		g_warning("couldn't read password store from file: %s", error->message);
 		g_error_free(error);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list