[sup-talk] Maildir source with one message
Christopher Warrington
chrisw at rice.edu
Mon Mar 3 02:07:55 EST 2008
In playing with offline IMAP and Maildir sources (much faster than a native IMAP source and it can be used offline!), I noticed an odd bug.
If there is only one message in a Maildir source, neither sup not
sup-sync can see this message. Adding another message makes both
visible messages visible.
--- here begins speculation ---
I *THINK* that this has to do with the definitions Source.start_offset
and Source.end_offset. As I understand it, they should define a range
of message ids [start_offset, end_offset).
Now, when start_offset = end_offset--as is the case when there is only
one message, bad things happen. As I understand the math:
(a,a) = {}
[a,a) = {} *our case
(a,a] = {}
[a,a] = {a.
Changing maildir.rb:126 from:
@ids.last
to
@ids.last + 1
appears to have fixed the problem without ill-effect.
Simple inspection of imap.rp leads be to believe that it will have the
same problem.
A mbox source will have the same problem iff the mbox is empty.
--- here ends speculation ---
--
Christopher Warrington <chrisw at rice.edu>
More information about the sup-talk
mailing list