[PATCH 3/4] On retrieving an attached message, retrieve TEXT part instead of the full rfc822/message.
- From: José Dapena Paz <jdapena igalia com>
- Subject: [PATCH 3/4] On retrieving an attached message, retrieve TEXT part instead of the full rfc822/message.
- Date: Mon, 21 Dec 2009 16:11:38 +0100
* libtinymail-camel/tny-camel-bs-msg-receive-strategy.c:
fetch the message/rfc822 contents using part.TEXT in
IMAP request.
---
ChangeLog | 4 ++++
.../tny-camel-bs-msg-receive-strategy.c | 10 +++++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7bd16d5..8fb6baa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-12-21 Jose Dapena Paz <jdapena igalia com>
+ * libtinymail-camel/tny-camel-bs-msg-receive-strategy.c:
+ fetch the message/rfc822 contents using part.TEXT in
+ IMAP request.
+
* libtinymail-camel/tny-camel-bs-mime-part.c: properly decode
filename field.
diff --git a/libtinymail-camel/tny-camel-bs-msg-receive-strategy.c b/libtinymail-camel/tny-camel-bs-msg-receive-strategy.c
index 1f1374b..c9104fa 100644
--- a/libtinymail-camel/tny-camel-bs-msg-receive-strategy.c
+++ b/libtinymail-camel/tny-camel-bs-msg-receive-strategy.c
@@ -83,11 +83,19 @@ tny_camel_bs_msg_receive_strategy_start_receiving_part (TnyCamelBsMsgReceiveStra
if (part_spec)
{
+ char *text_part_spec;
CamelFolder *cfolder = _tny_camel_folder_get_camel_folder (TNY_CAMEL_FOLDER (folder));
+ if (TNY_IS_CAMEL_BS_MSG (part)) {
+ text_part_spec = g_strconcat (part_spec, ".TEXT", NULL);
+ } else {
+ text_part_spec = g_strdup (part_spec);
+ }
+
/* TODO: play with IMAP's CONVERT here ... */
- filename = camel_folder_fetch (cfolder, uid, part_spec, binary, &ex);
+ filename = camel_folder_fetch (cfolder, uid, text_part_spec, binary, &ex);
+ g_free (text_part_spec);
if (camel_exception_is_set (&ex)) {
_tny_camel_exception_to_tny_error (&ex, err);
--
1.6.3.3
--=-1Q3M1KkkA2Tq782WYTM/
Content-Disposition: attachment; filename="0004-Retrieve-subparts-headers-on-retrieving-bs-message.patch"
Content-Type: text/x-patch; name="0004-Retrieve-subparts-headers-on-retrieving-bs-message.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]