summaryrefslogtreecommitdiff
path: root/lib/feed2imap/feed2imap.rb
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/feed2imap/feed2imap.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb
index e1e0f93..5b27673 100644
--- a/lib/feed2imap/feed2imap.rb
+++ b/lib/feed2imap/feed2imap.rb
@@ -205,7 +205,8 @@ class Feed2Imap
f.imapaccount.updatemail(f.folder, email,
i.cacheditem.index, i.date || Time::new)
end
- newitems.each do |i|
+ # reverse is needed to upload older items first (fixes gna#8986)
+ newitems.reverse.each do |i|
email = item_to_mail(i, i.cacheditem.index, false, f.name)
f.imapaccount.putmail(f.folder, email, i.date || Time::new)
end