summaryrefslogtreecommitdiff
path: root/mail/src
diff options
context:
space:
mode:
Diffstat (limited to 'mail/src')
-rw-r--r--mail/src/leap/mail/imap/soledadstore.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mail/src/leap/mail/imap/soledadstore.py b/mail/src/leap/mail/imap/soledadstore.py
index 9d198576..657f21fe 100644
--- a/mail/src/leap/mail/imap/soledadstore.py
+++ b/mail/src/leap/mail/imap/soledadstore.py
@@ -515,11 +515,12 @@ class SoledadStore(ContentDedup):
with self._last_uid_lock:
mbox_doc = self._get_mbox_document(mbox)
old_val = mbox_doc.content[key]
- if value < old_val:
+ if value > old_val:
+ mbox_doc.content[key] = value
+ self._soledad.put_doc(mbox_doc)
+ else:
logger.error("%r:%s Tried to write a UID lesser than what's "
"stored!" % (mbox, value))
- mbox_doc.content[key] = value
- self._soledad.put_doc(mbox_doc)
# deleted messages