diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-03-29 08:04:28 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-03-29 08:04:28 +0800 |
commit | 2ae8bdc41a685dd57200b3d9cb1502abc1f6e203 (patch) | |
tree | bf6511b96aa79f354ec937a8f2c4aa1eb44d3dfd | |
parent | f40295c6269f18922437a1bc9ece343871162b8b (diff) | |
download | gsoc2013-evolution-2ae8bdc41a685dd57200b3d9cb1502abc1f6e203.tar gsoc2013-evolution-2ae8bdc41a685dd57200b3d9cb1502abc1f6e203.tar.gz gsoc2013-evolution-2ae8bdc41a685dd57200b3d9cb1502abc1f6e203.tar.bz2 gsoc2013-evolution-2ae8bdc41a685dd57200b3d9cb1502abc1f6e203.tar.lz gsoc2013-evolution-2ae8bdc41a685dd57200b3d9cb1502abc1f6e203.tar.xz gsoc2013-evolution-2ae8bdc41a685dd57200b3d9cb1502abc1f6e203.tar.zst gsoc2013-evolution-2ae8bdc41a685dd57200b3d9cb1502abc1f6e203.zip |
We now have to check to make sure that p->message is non-NULL because we
2002-03-28 Jeffrey Stedfast <fejj@ximian.com>
* camel-filter-driver.c (do_copy): We now have to check to make
sure that p->message is non-NULL because we only load the message
when we have to.
(do_move): Same here.
svn path=/trunk/; revision=16280
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-filter-driver.c | 25 |
2 files changed, 29 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 00bfecf372..2b89937162 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +2002-03-28 Jeffrey Stedfast <fejj@ximian.com> + + * camel-filter-driver.c (do_copy): We now have to check to make + sure that p->message is non-NULL because we only load the message + when we have to. + (do_move): Same here. + 2002-03-28 Dan Winship <danw@ximian.com> * camel-transport.c (camel_transport_send_to): Change the message diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c index 9b62e119b5..f5dd16756c 100644 --- a/camel/camel-filter-driver.c +++ b/camel/camel-filter-driver.c @@ -461,11 +461,20 @@ do_copy (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriv g_ptr_array_add (uids, (char *) p->uid); camel_folder_copy_messages_to (p->source, uids, outbox, p->ex); g_ptr_array_free (uids, TRUE); - } else + } else { + if (p->message == NULL) + p->message = camel_folder_get_message (p->source, p->uid, p->ex); + + if (!p->message) { + /* FIXME: exception? */ + continue; + } + camel_folder_append_message (outbox, p->message, p->info, p->ex); + } if (!camel_exception_is_set (p->ex)) - p->copied = TRUE; + p->copied = TRUE; camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Copy to folder %s", folder); @@ -503,8 +512,17 @@ do_move (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriv g_ptr_array_add (uids, (char *) p->uid); camel_folder_copy_messages_to (p->source, uids, outbox, p->ex); g_ptr_array_free (uids, TRUE); - } else + } else { + if (p->message == NULL) + p->message = camel_folder_get_message (p->source, p->uid, p->ex); + + if (!p->message) { + /* FIXME: exception? */ + continue; + } + camel_folder_append_message (outbox, p->message, p->info, p->ex); + } if (!camel_exception_is_set (p->ex)) { /* a 'move' is a copy & delete */ @@ -744,6 +762,7 @@ camel_filter_driver_log (CamelFilterDriver *driver, enum filter_log_t status, co /* FIXME: does this need locking? Probably */ + /* FIXME: use info for these, not message since message may not be loaded */ from = camel_mime_message_get_from (p->message); fromstr = camel_address_format((CamelAddress *)from); subject = camel_mime_message_get_subject (p->message); |