diff options
author | Milan Crha <mcrha@redhat.com> | 2015-10-21 08:27:23 +0200 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2015-10-21 08:28:30 +0200 |
commit | c6ecd77cdcbb1e5d201925f684ec72115210a445 (patch) | |
tree | 594ea687b1a8de19ded76fbedf94af39479d2aca | |
parent | 99abd9baf2df12c08af5b05df516262193f19d15 (diff) | |
download | evolution-data-server-c6ecd77cdcbb1e5d201925f684ec72115210a445.tar.gz |
Bug 756842 - [Maildir] Do not overwrite received date on the message info ][
-rw-r--r-- | 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 04e2c3100..8e977e5aa 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); } } |