[almanah/almanah-0-6: 4/5] Add more debugging on failure to encrypt the database
- From: Philip Withnall <pwithnall src gnome org>
- To: svn-commits-list gnome org
- Subject: [almanah/almanah-0-6: 4/5] Add more debugging on failure to encrypt the database
- Date: Mon, 1 Jun 2009 05:29:39 -0400 (EDT)
commit 1289b2526382c0317bfaab863341c0af4d1111de
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Apr 23 17:58:08 2009 +0100
Add more debugging on failure to encrypt the database
---
ChangeLog | 5 +++++
src/storage-manager.c | 4 +++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c4bb5a3..15702d4 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-23 Philip Withnall <philip tecnocode co uk>
+
+ * src/storage-manager.c (database_idle_cb): Add more debugging on
+ failure to encrypt the database.
+
2009-04-10 Philip Withnall <philip tecnocode co uk>
* src/interface.c (almanah_interface_create_text_tags):
diff --git a/src/storage-manager.c b/src/storage-manager.c
index 3d0ab13..4bcd0b4 100644
--- a/src/storage-manager.c
+++ b/src/storage-manager.c
@@ -308,9 +308,11 @@ database_idle_cb (CipherOperation *operation)
AlmanahStorageManager *self = operation->storage_manager;
gpgme_error_t gpgme_error;
- if (!(gpgme_wait (operation->context, &gpgme_error, FALSE) == NULL && gpgme_error == 0)) {
+ if (gpgme_wait (operation->context, &gpgme_error, FALSE) != NULL || gpgme_error != GPG_ERR_NO_ERROR) {
struct stat db_stat;
+ g_warning (_("Error encrypting database: %s"), gpgme_strerror (gpgme_error));
+
/* Check to see if the encrypted file is 0B in size, which isn't good.
* Not much we can do about it except quit without deleting the plaintext database. */
g_stat (self->priv->filename, &db_stat);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]