commit 71edc7b75f80a4f0ea9e5ad65f1b6a7b4ab5a807
parent e49c69f1f61c7b671ce796d59668e4e41fcdbc25
Author: Eric Sherman <hyperbolist@gmail.com>
Date: Fri, 5 Feb 2010 11:19:03 -0500
prevent "year too big to marshal" crashes
Xapian::Document#entry= performs a Marshal.dump which was throwing a
"year too big to marshal" when adding a new message. I just
truncate_date'd the message's date when the entry hash is created in
sync_message and this problem went away for me.
It was a spam message, as the MIN_DATE/MAX_DATE comments hinted.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb
@@ -440,7 +440,7 @@ EOS
:message_id => m.id,
:source_id => m.source.id,
:source_info => m.source_info,
- :date => m.date,
+ :date => truncate_date(m.date),
:snippet => snippet,
:labels => m.labels.to_a,
:from => [m.from.email, m.from.name],