[PATCH 06/10] More fixes for bodystructure support (fix detecting if bodystruct is cached)
- From: Jose Dapena Paz <jdapena igalia com>
- Subject: [PATCH 06/10] More fixes for bodystructure support (fix detecting if bodystruct is cached)
- Date: Tue, 24 Nov 2009 19:00:57 +0100
---
.../providers/imap/camel-imap-message-cache.c | 19 ++++++++++++-------
libtinymail-camel/tny-camel-bs-msg-header.c | 2 +-
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-message-cache.c b/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-message-cache.c
index 9e1296a..48b43ff 100644
--- a/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-message-cache.c
+++ b/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-message-cache.c
@@ -351,14 +351,19 @@ cachefile_get(const char *path, const char *uid, const char *part_spec)
} else {
char tmp [512];
- snprintf(tmp, 512, "%s.~", uid);
- file = g_build_filename(path, tmp, NULL);
- if (!g_file_test(tmp, G_FILE_TEST_IS_REGULAR)) {
- /* Test if old cache file exists (like "uid."*/
- int len = strlen(file);
- file [len -1] = '\0';
+ snprintf(tmp, 512, "%s_bodystructure", uid);
+ file = g_build_filename (path, tmp, NULL);
+ if (!g_file_test (file, G_FILE_TEST_IS_REGULAR)) {
+ g_free (file);
+ snprintf(tmp, 512, "%s.~", uid);
+ file = g_build_filename(path, tmp, NULL);
if (!g_file_test(file, G_FILE_TEST_IS_REGULAR)) {
- file [len -1] = '~';
+ /* Test if old cache file exists (like "uid."*/
+ int len = strlen(file);
+ file [len -1] = '\0';
+ if (!g_file_test(file, G_FILE_TEST_IS_REGULAR)) {
+ file [len -1] = '~';
+ }
}
}
}
diff --git a/libtinymail-camel/tny-camel-bs-msg-header.c b/libtinymail-camel/tny-camel-bs-msg-header.c
index e8e5a36..502f2cf 100644
--- a/libtinymail-camel/tny-camel-bs-msg-header.c
+++ b/libtinymail-camel/tny-camel-bs-msg-header.c
@@ -105,7 +105,7 @@ tny_camel_bs_msg_header_dup_bcc (TnyHeader *self)
static TnyHeaderFlags
tny_camel_bs_msg_header_get_flags (TnyHeader *self)
{
- return 0;
+ return TNY_HEADER_FLAG_CACHED;
}
static void
--
1.6.3.3
--=-gnkDh763C8UIUYIzLd8x
Content-Disposition: attachment; filename="0007-Enable-by-default-BS-IMAP-implementation.patch"
Content-Type: text/x-patch; name="0007-Enable-by-default-BS-IMAP-implementation.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]