summaryrefslogtreecommitdiff
path: root/mail/src/leap
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
commit44263b4aceb2b828b9823055a95c83d0e439042d (patch)
tree3897403e3102dd13b867f3741f578e8854bf3b08 /mail/src/leap
parent198611dab96c26beb31dae843a07952a9bde3f5a (diff)
fix get_size call
Diffstat (limited to 'mail/src/leap')
-rw-r--r--mail/src/leap/mail/imap/memorystore.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mail/src/leap/mail/imap/memorystore.py b/mail/src/leap/mail/imap/memorystore.py
index ed2b3f20..d0321ae7 100644
--- a/mail/src/leap/mail/imap/memorystore.py
+++ b/mail/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)):