summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/memorystore.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-02-02 09:26:37 -0400
committerKali Kaneko <kali@leap.se>2014-02-02 18:08:31 -0400
commit18fed49c4143eb764ae9e806882d24f8f4e95744 (patch)
tree2c0c56a28ac9bf4839623b28de746670e6e4b499 /src/leap/mail/imap/memorystore.py
parent3a8fda3aa4645adbba228e7d2f204bfe6d400321 (diff)
fix missing content after in-memory add
because THE KEYS WILL BE STRINGS AFTER ADDED TO SOLEDAD Can I remember that? * Fix copy from local folders * Fix copy when we already have a copy of the message in the inbox, marked as deleted. * Fix also bad deferred.succeed in add_msg when it already exist.
Diffstat (limited to 'src/leap/mail/imap/memorystore.py')
-rw-r--r--src/leap/mail/imap/memorystore.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/leap/mail/imap/memorystore.py b/src/leap/mail/imap/memorystore.py
index 211d282..542e227 100644
--- a/src/leap/mail/imap/memorystore.py
+++ b/src/leap/mail/imap/memorystore.py
@@ -318,7 +318,7 @@ class MemoryStore(object):
store[FDOC])
hdoc = msg_dict.get(HDOC, None)
- if hdoc:
+ if hdoc is not None:
if not store.get(HDOC, None):
store[HDOC] = ReferenciableDict({})
store[HDOC].update(hdoc)
@@ -438,7 +438,8 @@ class MemoryStore(object):
if not self.producer.is_queue_empty():
return
- logger.info("Writing messages to Soledad...")
+ if any(map(lambda i: not empty(i), (self._new, self._dirty))):
+ logger.info("Writing messages to Soledad...")
# TODO change for lock, and make the property access
# is accquired
@@ -885,6 +886,7 @@ class MemoryStore(object):
# TODO expunge should add itself as a callback to the ongoing
# writes.
soledad_store = self._permanent_store
+ all_deleted = []
try:
# 1. Stop the writing call