From: Jeff Balogh Date: Fri, 18 Jan 2008 08:58:33 +0000 (-0500) Subject: modulo the file size in a maildir, so it's <= 7 digits. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=84b7ce1883c2d70057b1d0f68babdee24c92beb0;p=sup 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. --- 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