summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-02-17 11:31:40 -0400
committerKali Kaneko <kali@leap.se>2014-02-17 11:36:59 -0400
commit12ffea333922d99ee7f7b4ab2cd46cfcec6a0d05 (patch)
treed351e51a6181551ff98469085e4206665f62b8e5 /src
parent7828c517ae162de4676a71e05f77339598acd6f7 (diff)
fix get_size call
Diffstat (limited to 'src')
-rw-r--r--src/leap/mail/imap/memorystore.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/leap/mail/imap/memorystore.py b/src/leap/mail/imap/memorystore.py
index ed2b3f2..d0321ae 100644
--- a/src/leap/mail/imap/memorystore.py
+++ b/src/leap/mail/imap/memorystore.py
@@ -350,6 +350,12 @@ class MemoryStore(object):
continue
self._phash_store[phash] = weakref.proxy(referenciable_cdoc)
+ # Update memory store size
+ # XXX this should use [mbox][uid]
+ key = mbox, uid
+ self._sizes[key] = size.get_size(self._fdoc_store[key])
+ # TODO add hdoc and cdocs sizes too
+
def prune(seq, store):
for key in seq:
if key in store and empty(store.get(key)):