Don't fail when Geary fails to save the password to the keyring: Closes #5256
This commit is contained in:
parent
883e45577b
commit
7c0f7b8dc1
2 changed files with 4 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -8,4 +8,5 @@ build/
|
|||
/geary-mailer
|
||||
/geary-console
|
||||
*.xz
|
||||
*.swp
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue