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
bf4127c2d6
commit
c93f8710a3
@ -31,3 +31,8 @@ Changes
|
||||
|
||||
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.
|
||||
|
@ -274,6 +274,13 @@ class SyncableAccount(Account):
|
||||
remoterepos = self.remoterepos
|
||||
localrepos = self.localrepos
|
||||
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
|
||||
if not localrepos.getconfboolean('readonly', False):
|
||||
self.ui.syncfolders(remoterepos, localrepos)
|
||||
|
Loading…
Reference in New Issue
Block a user