[evolution-patches] no-subject messages not showing up sometimes
- From: Not Zed <notzed ximian com>
- To: asdf <evolution-patches lists ximian com>
- Subject: [evolution-patches] no-subject messages not showing up sometimes
- Date: Thu, 23 Dec 2004 16:25:30 +0800
i'm sure this is filed as a bug somewhere, but i don't know where it is. this is the problem that some messages with no subject don't show up in the list, even though they're counted as unread.
it will affect 2.8 too, and the patch should apply cleanly there.
this may affect some searches, but i dont think in any unexpected way.
Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog,v
retrieving revision 1.2339
diff -u -p -r1.2339 ChangeLog
--- camel/ChangeLog 23 Dec 2004 04:22:43 -0000 1.2339
+++ camel/ChangeLog 23 Dec 2004 08:24:22 -0000
@@ -1,5 +1,8 @@
2004-12-23 Not Zed <NotZed Ximian com>
+ * camel-folder-search.c (check_header): treat a missing header as
+ if it was set to "".
+
* camel-object.c (camel_object_is, camel_object_class_is)
(camel_interface_is): check for null values before dereferencing
them.
Index: camel/camel-folder-search.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-folder-search.c,v
retrieving revision 1.72
diff -u -p -r1.72 camel-folder-search.c
--- camel/camel-folder-search.c 2 Dec 2004 08:03:30 -0000 1.72
+++ camel/camel-folder-search.c 23 Dec 2004 08:24:22 -0000
@@ -881,23 +881,24 @@ check_header(struct _ESExp *f, int argc,
e_sexp_fatal_error(f, _("Performing query on unknown header: %s"), headername);
}
- if (header) {
- /* performs an OR of all words */
- for (i=1;i<argc && !truth;i++) {
- if (argv[i]->type == ESEXP_RES_STRING) {
- if (argv[i]->value.string[0] == 0) {
- truth = TRUE;
- } else if (how == CAMEL_SEARCH_MATCH_CONTAINS) {
- /* doesn't make sense to split words on anything but contains i.e. we can't have an ending match different words */
- words = camel_search_words_split(argv[i]->value.string);
- truth = TRUE;
- for (j=0;j<words->len && truth;j++) {
- truth = camel_search_header_match(header, words->words[j]->word, how, type, NULL);
- }
- camel_search_words_free(words);
- } else {
- truth = camel_search_header_match(header, argv[i]->value.string, how, type, NULL);
+ if (header == NULL)
+ header = "";
+
+ /* performs an OR of all words */
+ for (i=1;i<argc && !truth;i++) {
+ if (argv[i]->type == ESEXP_RES_STRING) {
+ if (argv[i]->value.string[0] == 0) {
+ truth = TRUE;
+ } else if (how == CAMEL_SEARCH_MATCH_CONTAINS) {
+ /* doesn't make sense to split words on anything but contains i.e. we can't have an ending match different words */
+ words = camel_search_words_split(argv[i]->value.string);
+ truth = TRUE;
+ for (j=0;j<words->len && truth;j++) {
+ truth = camel_search_header_match(header, words->words[j]->word, how, type, NULL);
}
+ camel_search_words_free(words);
+ } else {
+ truth = camel_search_header_match(header, argv[i]->value.string, how, type, NULL);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]