Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits.
@ 2008-01-18  8:58 Jeff Balogh
  2008-01-22  3:03 ` William Morgan
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Balogh @ 2008-01-18  8:58 UTC (permalink / raw)


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 files changed, 1 insertions(+), 1 deletions(-)

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
-- 
1.5.3.7




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-01-27 20:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-18  8:58 [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits Jeff Balogh
2008-01-22  3:03 ` William Morgan
2008-01-22 14:01   ` Jeff Balogh
2008-01-23  5:20     ` William Morgan
2008-01-22 20:44   ` Marcus Williams
2008-01-23  5:20     ` William Morgan
2008-01-23  9:59       ` Marcus Williams
2008-01-25  5:14         ` William Morgan
2008-01-27 20:07           ` Marcus Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox