]> git.cworth.org Git - sup/commitdiff
fixed couting
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 10 Feb 2007 20:12:51 +0000 (20:12 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 10 Feb 2007 20:12:51 +0000 (20:12 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@318 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/poll.rb

index f7c73bd3b1fd68fca27edb646856275f241435bb..fb29fabb4e9fefe36826afca122e2c00dfe729ef 100644 (file)
@@ -50,8 +50,10 @@ class PollManager
           ## always preserve the labels on disk.
           m.labels = entry[:label].split(/\s+/).map { |x| x.intern } if entry
           yield "Found message at #{offset} with labels {#{m.labels * ', '}}"
-          num += 1
-          numi += 1 if m.labels.include? :inbox
+          unless entry
+            num += 1
+            numi += 1 if m.labels.include? :inbox
+          end
           m
         end
         yield "Found #{num} messages, #{numi} to inbox" unless num == 0