diff options
author | Lucas Nussbaum <lucas@xanadu.blop.info> | 2009-09-04 07:54:51 +0200 |
---|---|---|
committer | Lucas Nussbaum <lucas@xanadu.blop.info> | 2009-09-04 07:54:51 +0200 |
commit | ec808b0f4bfd213b7b81996d8c46c1d98bbafa7c (patch) | |
tree | adc9ef825955a7a88d6e990f03b1f281294a0892 | |
parent | 3d25c0bd2772a8bbbdf073f8d395271b162fd168 (diff) | |
download | feed2imap-ec808b0f4bfd213b7b81996d8c46c1d98bbafa7c.tar.gz feed2imap-ec808b0f4bfd213b7b81996d8c46c1d98bbafa7c.tar.bz2 feed2imap-ec808b0f4bfd213b7b81996d8c46c1d98bbafa7c.zip |
fix to use Message-Id instead of X-CacheIndex
Diffstat (limited to '')
-rw-r--r-- | lib/feed2imap/maildir.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/feed2imap/maildir.rb b/lib/feed2imap/maildir.rb index b91fa64..a18e5aa 100644 --- a/lib/feed2imap/maildir.rb +++ b/lib/feed2imap/maildir.rb @@ -37,7 +37,6 @@ class MaildirAccount mail_files = find_mails(dir, idx) flags = nil if mail_files.length > 0 - puts "UPDATE: #{mail_files}" # get the info from the first result and delete everything info = maildir_file_info(mail_files[0]) mail_files.each { |f| File.delete(File.join(dir, f)) } @@ -138,10 +137,8 @@ class MaildirAccount Dir[File.join(subdir, '*')].each do |fn| File.open(fn) do |f| mail = RMail::Parser.read(f) - cache_index = mail.header['X-CacheIndex'] - next if not (cache_index and - cache_index =~ /^-[0-9]+-/ and - cache_index[1..-2].to_i == idx) + cache_index = mail.header['Message-Id'] + next if not (cache_index and cache_index == idx) dir_paths.push(File.join(d, File.basename(fn))) end end |