diff --git a/Changelog.draft.rst b/Changelog.draft.rst index 0a85888..79006fd 100644 --- a/Changelog.draft.rst +++ b/Changelog.draft.rst @@ -16,9 +16,14 @@ New Features Changes ------- +* Increase compatability with Gmail servers which claim to not support + the UIDPLUS extension but in reality do. + Bug Fixes --------- +* Fix hang when using Ctrl+C in some cases. + Pending for the next major release ================================== diff --git a/offlineimap/accounts.py b/offlineimap/accounts.py index 4903e39..7edfa37 100644 --- a/offlineimap/accounts.py +++ b/offlineimap/accounts.py @@ -265,10 +265,9 @@ class SyncableAccount(Account): mbnames.write() localrepos.forgetfolders() remoterepos.forgetfolders() + finally: localrepos.holdordropconnections() remoterepos.holdordropconnections() - finally: - pass hook = self.getconf('postsynchook', '') self.callhook(hook) diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py index 74a9b87..828070c 100644 --- a/offlineimap/folder/IMAP.py +++ b/offlineimap/folder/IMAP.py @@ -439,8 +439,9 @@ class IMAPFolder(BaseFolder): (typ,dat) = imapobj.check() assert(typ == 'OK') - # get the UID. - if use_uidplus: + # get the new UID. Test for APPENDUID response even if the + # server claims to not support it, as e.g. Gmail does :-( + if use_uidplus or imapobj._get_untagged_response('APPENDUID', True): # get the new UID from the APPENDUID response, it could look like # OK [APPENDUID 38505 3955] APPEND completed # with 38505 bein folder UIDvalidity and 3955 the new UID