diff options
author | Harish Krishnaswamy <kharish@novell.com> | 2005-01-18 16:58:02 +0800 |
---|---|---|
committer | Harish Krishnaswamy <kharish@src.gnome.org> | 2005-01-18 16:58:02 +0800 |
commit | cfe5021dc9c7a36ef76ca05448166f1a97b045de (patch) | |
tree | e7f2d3dd69a983252b27dfe680f5636290e34f0b /calendar | |
parent | 23694d6f4514a90de3b7fd668c05f5d6cd5ec5fa (diff) | |
download | gsoc2013-evolution-cfe5021dc9c7a36ef76ca05448166f1a97b045de.tar.gz 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')
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/dialogs/cal-attachment-bar.c | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index fc3c345723..1d63733b7c 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +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. + 2005-01-17 Rodrigo Moya <rodrigo@novell.com> * gui/calendar-component.c: 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); + } } } |