From c8dfed5b5f4ccb87003119f14e189566219365bb Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 18 Jun 2015 23:20:45 -0400 Subject: [bug] fixes for display attachments and move between folders - Add errback handling to catch properly errors that were not allowing the complete insertion of the parts for a given message. Fixes blank attachments and moving of messages to different folders. - Force overwritting of mdoc when it is a copy. This was avoiding a message to be copied back to a folder from where it already had been copied to another (since the mdoc was already existing there, with the same doc_id, which was forbidding the creation of the new one). This case also needs special care in the indexer, since we have to delete the old hash entry first. Closes: #7178, #7158 --- src/leap/mail/mailbox_indexer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/leap/mail/mailbox_indexer.py') diff --git a/src/leap/mail/mailbox_indexer.py b/src/leap/mail/mailbox_indexer.py index ab0967d..08e5f10 100644 --- a/src/leap/mail/mailbox_indexer.py +++ b/src/leap/mail/mailbox_indexer.py @@ -104,7 +104,6 @@ class MailboxIndexer(object): "uid INTEGER PRIMARY KEY AUTOINCREMENT, " "hash TEXT UNIQUE NOT NULL)".format( preffix=self.table_preffix, name=sanitize(mailbox_uuid))) - print "CREATING TABLE..." return self._operation(sql) def delete_table(self, mailbox_uuid): @@ -190,8 +189,7 @@ class MailboxIndexer(object): :type mailbox: str :param doc_id: the doc_id for the MetaMsg :type doc_id: str - :return: a deferred that will fire with the uid of the newly inserted - document. + :return: a deferred that will fire when the deletion has succed. :rtype: Deferred """ check_good_uuid(mailbox_uuid) -- cgit v1.2.3