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);
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);
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);
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);
g_free (basename);
+ /* indexing doesn't work with maildir properly, thus disable it */
+ g_object_set (folder, "index-body", FALSE, NULL);
+
return folder;
}