talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 4d2f6d203ee529b232c87e44d1da4779d0dc01e8
parent 7695cfb98ef6a2c4796c9b618fbeeea4234db901
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Sat, 20 Jan 2018 14:36:38 +0100

Do not consider missing passwordstorerc file as error.

Just continue with empty password store.

Diffstat:
Msrc/passwordstore.c | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 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);