Throw OfflineImapError when we try to request an inexistant message
During a sync run, someone might remove or move IMAP messages. As we only cache the list of UIDs in the beginning, we might be requesting UIDs that don't exist anymore. Protect folder.IMAP.getmessage() against the response that we get when we ask for unknown UIDs. Also, if the server responds with anything else than "OK", (eg. Gmail seems to be saying frequently ['NO', 'Dave I can't let you do that now'] :-) so we should also be throwing OfflineImapErrors here rather than AssertionErrors. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:

committed by
Nicolas Sebrecht

parent
41fad17125
commit
856982a4e6
@ -20,6 +20,9 @@ Bug Fixes
|
||||
---------
|
||||
|
||||
|
||||
* We protect more robustly against asking for inexistent messages from the
|
||||
IMAP server, when someone else deletes or moves messages while we sync.
|
||||
|
||||
Pending for the next major release
|
||||
==================================
|
||||
|
||||
|
Reference in New Issue
Block a user