diff --git a/offlineimap/accounts.py b/offlineimap/accounts.py index 4b02b13..2871be5 100644 --- a/offlineimap/accounts.py +++ b/offlineimap/accounts.py @@ -369,13 +369,13 @@ class SyncableAccount(Account): if not globals.options.singlethreading: thread = InstanceLimitedThread( - limitNamespace = "%s%s"% ( + limitNamespace="%s%s"% ( FOLDER_NAMESPACE, self.remoterepos.getname()), - target = syncfolder, - name = "Folder %s [acc: %s]"% ( + target=syncfolder, + name="Folder %s [acc: %s]"% ( remotefolder.getexplainedname(), self), - args = (self, remotefolder, quick) - ) + args=(self, remotefolder, quick) + ) thread.start() folderthreads.append(thread) else: @@ -533,17 +533,8 @@ def syncfolder(account, remotefolder, quick): statusfolder = statusrepos.getfolder(remotefolder.getvisiblename(). replace(remoterepos.getsep(), statusrepos.getsep())) statusfolder.openfiles() - - if localfolder.get_uidvalidity() == None: - # This is a new folder, so delete the status cache to be - # sure we don't have a conflict. - # TODO: This does not work. We always return a value, need - # to rework this... - statusfolder.deletemessagelist() - statusfolder.cachemessagelist() - # Load local folder. ui.syncingfolder(remoterepos, remotefolder, localrepos, localfolder) diff --git a/offlineimap/folder/LocalStatus.py b/offlineimap/folder/LocalStatus.py index 9d4075a..3d702b3 100644 --- a/offlineimap/folder/LocalStatus.py +++ b/offlineimap/folder/LocalStatus.py @@ -50,10 +50,6 @@ class LocalStatusFolder(BaseFolder): def getfullname(self): return self.filename - def deletemessagelist(self): - if not self.isnewfolder(): - os.unlink(self.filename) - # Interface from BaseFolder def msglist_item_initializer(self, uid): return {'uid': uid, 'flags': set(), 'labels': set(), 'time': 0, 'mtime': 0} diff --git a/offlineimap/folder/LocalStatusSQLite.py b/offlineimap/folder/LocalStatusSQLite.py index b1246d4..e2478b4 100644 --- a/offlineimap/folder/LocalStatusSQLite.py +++ b/offlineimap/folder/LocalStatusSQLite.py @@ -118,14 +118,6 @@ class LocalStatusSQLiteFolder(BaseFolder): def isnewfolder(self): return self._newfolder - - # Interface from LocalStatusFolder - def deletemessagelist(self): - """Delete all messages in the db.""" - - self.__sql_write('DELETE FROM status') - - def __sql_write(self, sql, vars=None, executemany=False): """Execute some SQL, retrying if the db was locked.