summaryrefslogtreecommitdiff
path: root/lib/feed2imap/imap.rb
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/feed2imap/imap.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/feed2imap/imap.rb b/lib/feed2imap/imap.rb
index c4e7106..60775e2 100644
--- a/lib/feed2imap/imap.rb
+++ b/lib/feed2imap/imap.rb
@@ -108,7 +108,7 @@ class ImapAccount
end
# update a mail
- def updatemail(folder, mail, id, date = Time::now)
+ def updatemail(folder, mail, id, date = Time::now, reupload_if_updated = true)
create_folder_if_not_exists(folder)
@connection.select(folder)
searchres = @connection.search(['HEADER', 'Message-Id', id])
@@ -119,6 +119,9 @@ class ImapAccount
searchres.each { |m| @connection.store(m, "+FLAGS", [:Deleted]) }
@connection.expunge
flags -= [ :Recent ] # avoids errors with dovecot
+ elsif not reupload_if_updated
+ # mail not present, and we don't want to re-upload it
+ return
end
@connection.append(folder, mail.gsub(/\n/, "\r\n"), flags, date)
end
be1b395ba0dfa8605fb575d70f4a5&follow=1'>Add small wrapper to C-gettextRené 'Necoro' Neumann2-1/+22 2009-08-31Update messages.potRené 'Necoro' Neumann1-42/+94 2009-08-31Removed the gtk- strings from translationsRené 'Necoro' Neumann7-3639/+3479 2009-08-31Removed the 'translatable' attribute from 'gtk-*' stringsRené 'Necoro' Neumann5-11/+11 2009-08-31Removed TODO. Renamed ChangeLog to TODORené 'Necoro' Neumann2-40/+0 2009-08-27Only import stuff if necessaryRené 'Necoro' Neumann1-8/+8 2009-08-25Release the threadQueue-Lock in syncv0.13René 'Necoro' Neumann1-0/+1 2009-08-25Updated portugese translationAlberto Federman Neto1-650/+687 2009-08-15Update spanish translationDaniel Halens1-245/+258 2009-08-15Use boolean flags instead of obscure C flags for ipc.MessageQueueRené 'Necoro' Neumann3-13/+15 2009-08-15TypoRené 'Necoro' Neumann1-1/+1 2009-08-15Enhanced the extensions.shRené 'Necoro' Neumann1-3/+8 2009-08-15Move eix-format to correct locationRené 'Necoro' Neumann1-0/+0