From 84b7ce1883c2d70057b1d0f68babdee24c92beb0 Mon Sep 17 00:00:00 2001 From: Jeff Balogh Date: Fri, 18 Jan 2008 03:58:33 -0500 Subject: [PATCH] modulo the file size in a maildir, so it's <= 7 digits. The size needs to be <= 7 digits to preserve sup's increasing id requirement. Otherwise, large messages (probably w/ attachments) have an id that is a magnitude larger than small messages. --- lib/sup/maildir.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index ba9da00..7b85383 100644 --- a/lib/sup/maildir.rb +++ b/lib/sup/maildir.rb @@ -144,7 +144,7 @@ private def make_id fn # use 7 digits for the size. why 7? seems nice. - sprintf("%d%07d", File.mtime(fn), File.size(fn)).to_i + sprintf("%d%07d", File.mtime(fn), File.size(fn) % 10000000).to_i end def with_file_for id -- 2.45.2