]> git.cworth.org Git - sup/commitdiff
bugfixes: offset doesn't need to be +1, and message refs should be uniq'd
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 29 Nov 2006 19:01:31 +0000 (19:01 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 29 Nov 2006 19:01:31 +0000 (19:01 +0000)
before being added to the index

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@52 5c8cc53c-5e98-4d25-b20a-d8db53a31250

bin/sup-import
lib/sup/index.rb
lib/sup/mbox/loader.rb

index 94d9a61e3e86487348dc1db50bc13ba2499db5a4..05277000f69214651c4a601bf2bb2f29e4f1cd56 100644 (file)
@@ -54,7 +54,6 @@ The following options can also be specified:
   --optimize:      optimize the index after adding any new messages.
   --help:          don't do anything, just show this message.
 EOS
-#' stupid ruby-mode
   exit
 end
 
index 255e2f82dad0a377476df00fac50129b2a661a16..90bfc2836067ff86d7d3352a6c35d5e847fbfb24 100644 (file)
@@ -238,7 +238,7 @@ class Index
       :from => m.from ? m.from.email : "",
       :to => (m.to + m.cc + m.bcc).map { |x| x.email }.join(" "),
       :subject => wrap_subj(Message.normalize_subj(m.subj)),
-      :refs => (m.refs + m.replytos).join(" "),
+      :refs => (m.refs + m.replytos).uniq.join(" "),
     }
 
     @index.add_document d
index f144683619a6d87f2afce0a538dca61454000314..51af5f26742e22312979cf46ba05497c3c5d216d 100644 (file)
@@ -85,7 +85,7 @@ class Loader
       next_end_offset = @f.tell
       while(line = @f.gets)
         break if line =~ BREAK_RE
-        next_end_offset = @f.tell + 1
+        next_end_offset = @f.tell
       end
     end