summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-01-09 00:13:18 -0300
committerTomás Touceda <chiiph@leap.se>2014-01-09 00:13:18 -0300
commitdffaa3c58d12c91e31d5a95d3cf43c00a9ce4604 (patch)
treeb18f43fa843b836515219eb40a5370ca560f4eee /src/leap/bitmask
parentdf0d02a565631693f62e99abb2b4be8b8bd450f5 (diff)
parentd508f41a6f0ae1f16ee2c0f28b6fb2484d487d4f (diff)
Merge remote-tracking branch 'refs/remotes/kali/bug/update-mail-path' into develop
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/services/mail/repair.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/leap/bitmask/services/mail/repair.py b/src/leap/bitmask/services/mail/repair.py
index 767df1ef..30571adf 100644
--- a/src/leap/bitmask/services/mail/repair.py
+++ b/src/leap/bitmask/services/mail/repair.py
@@ -28,7 +28,7 @@ from leap.bitmask.crypto.srpauth import SRPAuth
from leap.bitmask.util import get_path_prefix
from leap.bitmask.services.soledad.soledadbootstrapper import get_db_paths
-from leap.mail.imap.server import SoledadBackedAccount
+from leap.mail.imap.account import SoledadBackedAccount
from leap.soledad.client import Soledad
logger = logging.getLogger(__name__)
@@ -145,11 +145,11 @@ class MBOXPlumber(object):
self.acct = SoledadBackedAccount(self.userid, self.sol)
for mbox_name in self.acct.mailboxes:
- self.repair_mbox(mbox_name)
+ self.repair_mbox_uids(mbox_name)
print "done."
self.exit()
- def repair_mbox(self, mbox_name):
+ def repair_mbox_uids(self, mbox_name):
"""
Repairs indexes for a given mbox
@@ -176,7 +176,8 @@ class MBOXPlumber(object):
old_uid = doc.content['uid']
doc.content['uid'] = mindex
self.sol.put_doc(doc)
- print "%s -> %s (%s)" % (mindex, doc.content['uid'], old_uid)
+ if mindex != old_uid:
+ print "%s -> %s (%s)" % (mindex, doc.content['uid'], old_uid)
old_last_uid = mbox.last_uid
mbox.last_uid = len_mbox