[evolution-data-server] Bug #671470 - Mail search on body doesn't work (local mail)
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #671470 - Mail search on body doesn't work (local mail)
- Date: Wed, 7 Mar 2012 10:08:49 +0000 (UTC)
commit 13aed50b786a147b0c1c7dac53e82e5742202f04
Author: Milan Crha <mcrha redhat com>
Date: Wed Mar 7 11:07:18 2012 +0100
Bug #671470 - Mail search on body doesn't work (local mail)
This contains also an interim "solution", till body indexing for
maildir folders is properly fixed.
camel/providers/local/camel-local-folder.c | 15 ++++++++++++---
camel/providers/local/camel-maildir-folder.c | 9 +++++++--
2 files changed, 19 insertions(+), 5 deletions(-)
---
diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c
index 10662aa..b62975a 100644
--- a/camel/providers/local/camel-local-folder.c
+++ b/camel/providers/local/camel-local-folder.c
@@ -239,7 +239,10 @@ local_folder_search_by_expression (CamelFolder *folder,
local_folder->search = camel_folder_search_new ();
camel_folder_search_set_folder (local_folder->search, folder);
- camel_folder_search_set_body_index (local_folder->search, local_folder->index);
+ if (camel_local_folder_get_index_body (local_folder))
+ camel_folder_search_set_body_index (local_folder->search, local_folder->index);
+ else
+ camel_folder_search_set_body_index (local_folder->search, NULL);
matches = camel_folder_search_search (local_folder->search, expression, NULL, error);
CAMEL_LOCAL_FOLDER_UNLOCK (folder, search_lock);
@@ -265,7 +268,10 @@ local_folder_search_by_uids (CamelFolder *folder,
local_folder->search = camel_folder_search_new ();
camel_folder_search_set_folder (local_folder->search, folder);
- camel_folder_search_set_body_index (local_folder->search, local_folder->index);
+ if (camel_local_folder_get_index_body (local_folder))
+ camel_folder_search_set_body_index (local_folder->search, local_folder->index);
+ else
+ camel_folder_search_set_body_index (local_folder->search, NULL);
matches = camel_folder_search_search (local_folder->search, expression, uids, error);
CAMEL_LOCAL_FOLDER_UNLOCK (folder, search_lock);
@@ -345,7 +351,10 @@ local_folder_count_by_expression (CamelFolder *folder,
local_folder->search = camel_folder_search_new ();
camel_folder_search_set_folder (local_folder->search, folder);
- camel_folder_search_set_body_index (local_folder->search, local_folder->index);
+ if (camel_local_folder_get_index_body (local_folder))
+ camel_folder_search_set_body_index (local_folder->search, local_folder->index);
+ else
+ camel_folder_search_set_body_index (local_folder->search, NULL);
matches = camel_folder_search_count (local_folder->search, expression, error);
CAMEL_LOCAL_FOLDER_UNLOCK (folder, search_lock);
diff --git a/camel/providers/local/camel-maildir-folder.c b/camel/providers/local/camel-maildir-folder.c
index dcb0887..9f79fb9 100644
--- a/camel/providers/local/camel-maildir-folder.c
+++ b/camel/providers/local/camel-maildir-folder.c
@@ -474,8 +474,10 @@ camel_maildir_folder_new (CamelStore *parent_store,
folder = g_object_new (
CAMEL_TYPE_MAILDIR_FOLDER,
- "display-name", basename, "full-name", full_name,
- "parent-store", parent_store, NULL);
+ "display-name", basename,
+ "full-name", full_name,
+ "parent-store", parent_store,
+ NULL);
service = CAMEL_SERVICE (parent_store);
settings = camel_service_get_settings (service);
@@ -491,6 +493,9 @@ camel_maildir_folder_new (CamelStore *parent_store,
g_free (basename);
+ /* indexing doesn't work with maildir properly, thus disable it */
+ g_object_set (folder, "index-body", FALSE, NULL);
+
return folder;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]