From 7b44f609f0832be2088bb2840c93eff372de67b7 Mon Sep 17 00:00:00 2001 From: jgoerzen Date: Thu, 8 Aug 2002 03:22:38 +0100 Subject: [PATCH] /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. --- offlineimap/head/offlineimap.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/offlineimap/head/offlineimap.py b/offlineimap/head/offlineimap.py index eb36bae..8b072d6 100644 --- a/offlineimap/head/offlineimap.py +++ b/offlineimap/head/offlineimap.py @@ -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()