commit 84b7ce1883c2d70057b1d0f68babdee24c92beb0
parent f498025a70092a4f29322e7be8f578e525fae0fe
Author: Jeff Balogh <its.jeff.balogh@gmail.com>
Date: Fri, 18 Jan 2008 03:58:33 -0500
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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