summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/feed2imap/maildir.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/feed2imap/maildir.rb b/lib/feed2imap/maildir.rb
index 76678e2..317f631 100644
--- a/lib/feed2imap/maildir.rb
+++ b/lib/feed2imap/maildir.rb
@@ -35,7 +35,7 @@ class MaildirAccount
end
end
- def updatemail(folder, mail, idx, date = Time::now)
+ def updatemail(folder, mail, idx, date = Time::now, reupload_if_updated = true)
dir = folder_dir(folder)
guarantee_maildir(dir)
mail_files = find_mails(dir, idx)
@@ -44,6 +44,9 @@ class MaildirAccount
# 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)) }
+ elsif not reupload_if_updated
+ # mail not present, and we don't want to re-upload it
+ return
end
store_message(dir, date, info) { |f| f.puts(mail) }
end
k" file that includes Git's Makefile and make all of the existing logic apply to CGit's objects as well. This is slightly complicated because Git's Makefile must run in Git's directory, so all references to CGit files need to be prefixed with "../". In addition, OBJECTS is a simply expanded variable in Git's Makefile so we cannot just add our objects to it. Instead we must copy the two applicable rules into "cgit.mk". This has the advantage that we can split CGit-specific CFLAGS from Git's CFLAGS and hence avoid rebuilding all of Git whenever a CGit-specific value changes. Signed-off-by: John Keeping <john@keeping.me.uk> Acked-by: Jamie Couture <jamie.couture@gmail.com>