From mboxrd@z Thu Jan 1 00:00:00 1970 From: sgoldman@tower-research.com (Steve Goldman) Date: Fri, 01 May 2009 16:23:53 -0400 Subject: [sup-talk] Inconsistent inbox after restart In-Reply-To: References: <1240945125-sup-8484@sgoldmanlinux.tower-research.com> <1241028590-sup-8155@entry> <1241075456-sup-909@h984274.serverkompetenz.net> <1241095872-sup-9569@sgoldmanlinux.tower-research.com> <1241098531-sup-1508@entry> <1241101364-sup-9621@sgoldmanlinux.tower-research.com> Message-ID: <1241209146-sup-3561@sgoldmanlinux.tower-research.com> I have found the offensive commit... Whoever was working on this, can you take a look and figure out where the bug is? (And for all you perl bashers out there, given this ridiculous line of ruby, you officially can't talk any more shit.) 063ec996a24b13b5dc9a59e21aa42ba629ab510a --- a/lib/sup/poll.rb +++ b/lib/sup/poll.rb @@ -97,7 +97,7 @@ EOS numi = 0 add_messages_from source do |m, offset, entry| ## always preserve the labels on disk. - m.labels = entry[:label].split(/\s+/).map { |x| x.intern } if entry + m.labels = ((m.labels - [:unread, :inbox]) + entry[:label].split(/\s+/).map { |x| x.intern }).uniq if entry yield "Found message at #{offset} with labels {#{m.labels * ', '}}" unless entry num += 1 -- Steve Goldman sgoldman at tower-research.com T: 212.219.6014 F: 212.219.6007 Tower Research Capital, LLC 377 Broadway, 11th Fl. New York, NY 10013