aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorHarish Krishnaswamy <kharish@novell.com>2005-01-18 16:58:02 +0800
committerHarish Krishnaswamy <kharish@src.gnome.org>2005-01-18 16:58:02 +0800
commitcfe5021dc9c7a36ef76ca05448166f1a97b045de (patch)
treee7f2d3dd69a983252b27dfe680f5636290e34f0b /calendar/gui
parent23694d6f4514a90de3b7fd668c05f5d6cd5ec5fa (diff)
downloadgsoc2013-evolution-cfe5021dc9c7a36ef76ca05448166f1a97b045de.tar
gsoc2013-evolution-cfe5021dc9c7a36ef76ca05448166f1a97b045de.tar.gz
gsoc2013-evolution-cfe5021dc9c7a36ef76ca05448166f1a97b045de.tar.bz2
gsoc2013-evolution-cfe5021dc9c7a36ef76ca05448166f1a97b045de.tar.lz
gsoc2013-evolution-cfe5021dc9c7a36ef76ca05448166f1a97b045de.tar.xz
gsoc2013-evolution-cfe5021dc9c7a36ef76ca05448166f1a97b045de.tar.zst
gsoc2013-evolution-cfe5021dc9c7a36ef76ca05448166f1a97b045de.zip
handle error conditions more gracefully.
2005-01-18 Harish Krishnaswamy <kharish@novell.com> * gui/dialogs/cal-attachment-bar.c (cal_attachment_bar_get_attachment_list): handle error conditions more gracefully. svn path=/trunk/; revision=28432
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/cal-attachment-bar.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/calendar/gui/dialogs/cal-attachment-bar.c b/calendar/gui/dialogs/cal-attachment-bar.c
index daca395904..57c0cab5f1 100644
--- a/calendar/gui/dialogs/cal-attachment-bar.c
+++ b/calendar/gui/dialogs/cal-attachment-bar.c
@@ -804,12 +804,14 @@ cal_attachment_bar_get_attachment_list (CalAttachmentBar *bar)
if (fd == -1) {
/* TODO handle error conditions */
g_message ("DEBUG: could not open the file descriptor\n");
+ continue;
}
/* write the camel mime part (attachment->body) into the file*/
if (camel_write (fd, buffer, mstream->buffer->len) == -1) {
/* TODO handle error condition */
g_message ("DEBUG: camel write failed.\n");
+ continue;
}
list = g_slist_append (list, g_strdup (attach_file_url));
/* do i need to close the fd */
@@ -866,10 +868,12 @@ cal_attachment_bar_set_attachment_list (CalAttachmentBar *bar, GSList *attach_li
/* set file name correctly on the display */
attach = g_slist_nth_data (priv->attachments,
priv->num_attachments-1);
- camel_mime_part_set_filename (attach->body,
- attach_filename + strlen (priv->local_attachment_store)+
- strlen (priv->comp_uid) + 1);
- update (bar);
+ if (attach) {
+ camel_mime_part_set_filename (attach->body,
+ attach_filename + strlen (priv->local_attachment_store)+
+ strlen (priv->comp_uid) + 1);
+ update (bar);
+ }
}
}