From 7c0f7b8dc1890997c55fe2af41874e31c8b9555f Mon Sep 17 00:00:00 2001 From: Matthew Pirocchi Date: Wed, 23 May 2012 16:39:52 -0700 Subject: [PATCH] Don't fail when Geary fails to save the password to the keyring: Closes #5256 --- .gitignore | 1 + src/client/util/util-keyring.vala | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3d4d845d..694ce720 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ build/ /geary-mailer /geary-console *.xz +*.swp diff --git a/src/client/util/util-keyring.vala b/src/client/util/util-keyring.vala index a6a4dead..6ecaf864 100644 --- a/src/client/util/util-keyring.vala +++ b/src/client/util/util-keyring.vala @@ -6,13 +6,13 @@ const string GEARY_USERNAME_PREFIX = "org.yorba.geary username:"; -public static void keyring_save_password(string username, string password) { +public static bool keyring_save_password(string username, string password) { string name = GEARY_USERNAME_PREFIX + username; GnomeKeyring.Result res = GnomeKeyring.store_password_sync(GnomeKeyring.NETWORK_PASSWORD, null, name, password, "user", name); - - assert(res == GnomeKeyring.Result.OK); + + return res == GnomeKeyring.Result.OK; } // Returns the password for the given username, or null if not set.