diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-07-13 01:26:39 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-07-13 01:26:39 +0800 |
commit | a61afbdb02e8c9aa5c7845f973649c809ede386d (patch) | |
tree | c993be948a9d53a4cbaa6b065071e6eccfb563f8 /camel | |
parent | 0ad8e54134e6eee7a322bf25e8a17fcd2d3826c5 (diff) | |
download | gsoc2013-evolution-a61afbdb02e8c9aa5c7845f973649c809ede386d.tar gsoc2013-evolution-a61afbdb02e8c9aa5c7845f973649c809ede386d.tar.gz gsoc2013-evolution-a61afbdb02e8c9aa5c7845f973649c809ede386d.tar.bz2 gsoc2013-evolution-a61afbdb02e8c9aa5c7845f973649c809ede386d.tar.lz gsoc2013-evolution-a61afbdb02e8c9aa5c7845f973649c809ede386d.tar.xz gsoc2013-evolution-a61afbdb02e8c9aa5c7845f973649c809ede386d.tar.zst gsoc2013-evolution-a61afbdb02e8c9aa5c7845f973649c809ede386d.zip |
Only set p->copied and p->deleted if the messages are copied without an
2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
* camel-filter-driver.c (do_move): Only set p->copied and
p->deleted if the messages are copied without an exception.
(do_copy): Same - but obviously we don't set the p->deleted here
at all.
(camel_filter_driver_filter_message): Since users complained that
they couldn't filter deleted messages for "safe keeping" (WTF?
safe keeping? why were they deleted in the first place then??), I
have taken out the code that optimized filtering by not allowing
deleted messages to be filtered. This fixes bug #4473.
Note: Users have a warped sense of logic.
svn path=/trunk/; revision=11047
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 14 | ||||
-rw-r--r-- | camel/camel-filter-driver.c | 18 |
2 files changed, 25 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 520f7c99a8..a2791753e7 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,17 @@ +2001-07-12 Jeffrey Stedfast <fejj@ximian.com> + + * camel-filter-driver.c (do_move): Only set p->copied and + p->deleted if the messages are copied without an exception. + (do_copy): Same - but obviously we don't set the p->deleted here + at all. + (camel_filter_driver_filter_message): Since users complained that + they couldn't filter deleted messages for "safe keeping" (WTF? + safe keeping? why were they deleted in the first place then??), I + have taken out the code that optimized filtering by not allowing + deleted messages to be filtered. This fixes bug #4473. + + Note: Users have a warped sense of logic. + 2001-07-12 Not Zed <NotZed@Ximian.com> * camel-mime-part-utils.c (extract_metatag_charset): Removed. diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c index 92cce8bab8..06a0bc0824 100644 --- a/camel/camel-filter-driver.c +++ b/camel/camel-filter-driver.c @@ -369,13 +369,15 @@ do_copy (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriv if (!outbox) break; - p->copied = TRUE; if (p->uid && p->source && camel_folder_has_summary_capability (p->source)) { GPtrArray *uids; uids = g_ptr_array_new (); g_ptr_array_add (uids, (char *) p->uid); camel_folder_copy_messages_to (p->source, uids, outbox, p->ex); + if (!camel_exception_is_set (p->ex)) + p->copied = TRUE; + g_ptr_array_free (uids, TRUE); } else camel_folder_append_message (outbox, p->message, p->info, p->ex); @@ -406,15 +408,17 @@ do_move (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriv if (!outbox) break; - p->copied = TRUE; - p->deleted = TRUE; /* a 'move' is a copy & delete */ - if (p->uid && p->source && camel_folder_has_summary_capability (p->source)) { GPtrArray *uids; uids = g_ptr_array_new (); g_ptr_array_add (uids, (char *) p->uid); camel_folder_copy_messages_to (p->source, uids, outbox, p->ex); + if (!camel_exception_is_set (p->ex)) { + /* a 'move' is a copy & delete */ + p->copied = TRUE; + p->deleted = TRUE; + } g_ptr_array_free (uids, TRUE); } else camel_folder_append_message (outbox, p->message, p->info, p->ex); @@ -848,9 +852,6 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage info = camel_message_info_new_from_header (h); freeinfo = TRUE; - } else { - if (info->flags & CAMEL_MESSAGE_DELETED) - return 0; } p->ex = ex; @@ -862,6 +863,9 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage p->uid = uid; p->source = source; + if (info->flags & CAMEL_MESSAGE_DELETED) + p->deleted = TRUE; + if (original_source_url && camel_mime_message_get_source (message) == NULL) camel_mime_message_set_source (message, original_source_url); |