[evolution-data-server/gnome-3-18] Bug 756842 - [Maildir] Do not overwrite received date on the message info ][
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-18] Bug 756842 - [Maildir] Do not overwrite received date on the message info ][
- Date: Wed, 21 Oct 2015 06:29:27 +0000 (UTC)
commit c6ecd77cdcbb1e5d201925f684ec72115210a445
Author: Milan Crha <mcrha redhat com>
Date: Wed Oct 21 08:27:23 2015 +0200
Bug 756842 - [Maildir] Do not overwrite received date on the message info ][
camel/providers/local/camel-maildir-summary.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/local/camel-maildir-summary.c b/camel/providers/local/camel-maildir-summary.c
index 04e2c31..8e977e5 100644
--- a/camel/providers/local/camel-maildir-summary.c
+++ b/camel/providers/local/camel-maildir-summary.c
@@ -296,6 +296,15 @@ maildir_summary_add (CamelLocalSummary *cls,
if (info) {
camel_maildir_info_set_filename (mi, camel_maildir_summary_info_to_name (mi));
d (printf ("Setting filename to %s\n", camel_maildir_info_filename (mi)));
+
+ /* Inherit the Received date from the passed-in info only if it is set and
+ the new message info doesn't have it set or it's set to the default
+ value, derived from the message UID. */
+ if (camel_message_info_date_received (info) > 0 &&
+ (camel_message_info_date_received (mi) <= 0 ||
+ (camel_message_info_uid (mi) &&
+ camel_message_info_date_received (mi) == strtoul (camel_message_info_uid (mi),
NULL, 10))))
+ mi->info.info.date_received = camel_message_info_date_received (info);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]