/offlineimap/head: changeset 207

- Oops, incomplete commit from the last one:

- If a given Maildir folder is new, remove the associated local status
  cache file, if any. That way, there will not be any chance of
  propogating hordes of deletes and adds based on old status data.
This commit is contained in:
jgoerzen 2002-08-08 03:22:38 +01:00
parent 225e9c61d6
commit 7b44f609f0
1 changed files with 6 additions and 0 deletions

View File

@ -179,10 +179,16 @@ def syncfolder(accountname, remoterepos, remotefolder, localrepos,
localfolder.cachemessagelist()
ui.messagelistloaded(localrepos, localfolder, len(localfolder.getmessagelist().keys()))
# Load status folder.
statusfolder = statusrepos.getfolder(remotefolder.getvisiblename().\
replace(remoterepos.getsep(),
statusrepos.getsep()))
if localfolder.getuidvalidity() == None:
# This is a new folder, so delete the status cache to be sure
# we don't have a conflict.
statusfolder.deletemessagelist()
statusfolder.cachemessagelist()