Init folder list early enough
We need the list of folders and the folder delimiter, but it was not always retrieved early enough. E.g. when doing IMAP<->IMAP sync and the local IMAP being readonly, we would bunk out with a mysterious error message become repository.getsel() would still return None. This commit fixes this error. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
3bc68ecd65
commit
8c44115807
@ -18,3 +18,8 @@ Changes
|
|||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
* IMAP<->IMAP sync with a readonly local IMAP repository failed with a
|
||||||
|
rather mysterious "TypeError: expected a character buffer object"
|
||||||
|
error. Fix this my retrieving the list of folders early enough even
|
||||||
|
for readonly repositories.
|
||||||
|
@ -265,6 +265,13 @@ class SyncableAccount(Account):
|
|||||||
remoterepos = self.remoterepos
|
remoterepos = self.remoterepos
|
||||||
localrepos = self.localrepos
|
localrepos = self.localrepos
|
||||||
statusrepos = self.statusrepos
|
statusrepos = self.statusrepos
|
||||||
|
|
||||||
|
# init repos with list of folders, so we have them (and the
|
||||||
|
# folder delimiter etc)
|
||||||
|
remoterepos.getfolders()
|
||||||
|
localrepos.getfolders()
|
||||||
|
statusrepos.getfolders()
|
||||||
|
|
||||||
# replicate the folderstructure between REMOTE to LOCAL
|
# replicate the folderstructure between REMOTE to LOCAL
|
||||||
if not localrepos.getconfboolean('readonly', False):
|
if not localrepos.getconfboolean('readonly', False):
|
||||||
self.ui.syncfolders(remoterepos, localrepos)
|
self.ui.syncfolders(remoterepos, localrepos)
|
||||||
|
Loading…
Reference in New Issue
Block a user