aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/backend/pas/pas-backend-summary.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 9ec7dfdb57..5255a627cb 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-27 Chris Toshok <toshok@ximian.com>
+
+ * backend/pas/pas-backend-summary.c (save_string): don't save
+ empty strings.
+ (pas_backend_summary_save): print out the errno when we fail.
+
2002-07-26 Ettore Perazzoli <ettore@ximian.com>
* gui/component/addressbook.c: Don't set up the ContactNew and
diff --git a/addressbook/backend/pas/pas-backend-summary.c b/addressbook/backend/pas/pas-backend-summary.c
index 55c9144ed3..a8ed8c05f9 100644
--- a/addressbook/backend/pas/pas-backend-summary.c
+++ b/addressbook/backend/pas/pas-backend-summary.c
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <errno.h>
#include <netinet/in.h>
@@ -525,7 +526,7 @@ save_string (const char *str, FILE *fp)
{
int rv;
- if (!str)
+ if (!str || !*str)
return TRUE;
rv = fwrite (str, strlen (str), 1, fp);
@@ -624,7 +625,7 @@ pas_backend_summary_save (PASBackendSummary *summary)
for (i = 0; i < summary->priv->items->len; i ++) {
PASBackendSummaryItem *item = g_ptr_array_index (summary->priv->items, i);
if (!pas_backend_summary_save_item (summary, fp, item)) {
- g_warning ("failed to write an item to new summary file");
+ g_warning ("failed to write an item to new summary file, errno = %d", errno);
goto lose;
}
}