From mboxrd@z Thu Jan 1 00:00:00 1970 From: chrisw@rice.edu (Christopher Warrington) Date: Mon, 03 Mar 2008 01:07:55 -0600 Subject: [sup-talk] Maildir source with one message Message-ID: <1204528063-sup-7345@chris-tablet> 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