/head: changeset 114
Added workaround for UW IMAPd
This commit is contained in:
parent
53625f0dbb
commit
1c14751a74
@ -164,25 +164,38 @@ def syncfolder(accountname, remoterepos, remotefolder, localrepos,
|
||||
localfolder = localrepos.\
|
||||
getfolder(remotefolder.getvisiblename().\
|
||||
replace(remoterepos.getsep(), localrepos.getsep()))
|
||||
if not localfolder.isuidvalidityok(remotefolder):
|
||||
ui.validityproblem(remotefolder)
|
||||
return
|
||||
# Load local folder
|
||||
ui.syncingfolder(remoterepos, remotefolder, localrepos, localfolder)
|
||||
ui.loadmessagelist(localrepos, localfolder)
|
||||
localfolder.cachemessagelist()
|
||||
ui.messagelistloaded(localrepos, localfolder, len(localfolder.getmessagelist().keys()))
|
||||
|
||||
# Load status folder.
|
||||
statusfolder = statusrepos.getfolder(remotefolder.getvisiblename().\
|
||||
replace(remoterepos.getsep(),
|
||||
statusrepos.getsep()))
|
||||
statusfolder.cachemessagelist()
|
||||
|
||||
|
||||
# If either the local or the status folder has messages and
|
||||
# there is a UID validity problem, warn and abort.
|
||||
# If there are no messages, UW IMAPd loses UIDVALIDITY.
|
||||
# But we don't really need it if both local folders are empty.
|
||||
# So, in that case, save it off.
|
||||
if (len(localfolder.getmessagelist()) or \
|
||||
len(statusfolder.getmessagelist())) and \
|
||||
not localfolder.isuidvalidityok(remotefolder):
|
||||
ui.validityproblem(remotefolder)
|
||||
return
|
||||
else:
|
||||
localfolder.saveuidvalidity(remotefolder.getuidvalidity())
|
||||
|
||||
# Load remote folder.
|
||||
ui.loadmessagelist(remoterepos, remotefolder)
|
||||
remotefolder.cachemessagelist()
|
||||
ui.messagelistloaded(remoterepos, remotefolder,
|
||||
len(remotefolder.getmessagelist().keys()))
|
||||
|
||||
# Load status folder.
|
||||
statusfolder = statusrepos.getfolder(remotefolder.getvisiblename().\
|
||||
replace(remoterepos.getsep(),
|
||||
statusrepos.getsep()))
|
||||
statusfolder.cachemessagelist()
|
||||
|
||||
#
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user