fix: when called with -a, mbnames must not erase entries of other accounts
Make mbnames to work with intermediate files, one per account, in the JSON format. The mbnames target is built from those intermediate files. Github-Fix: https://github.com/OfflineIMAP/offlineimap/issues/66 Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
@ -369,9 +369,7 @@ class SyncableAccount(Account):
|
||||
# wait for all threads to finish
|
||||
for thr in folderthreads:
|
||||
thr.join()
|
||||
# Write out mailbox names if required and not in dry-run mode
|
||||
if not self.dryrun:
|
||||
mbnames.write(False)
|
||||
mbnames.writeIntermediateFile(self.name) # Write out mailbox names.
|
||||
localrepos.forgetfolders()
|
||||
remoterepos.forgetfolders()
|
||||
except:
|
||||
@ -512,9 +510,9 @@ def syncfolder(account, remotefolder, quick):
|
||||
# Load local folder.
|
||||
localfolder = account.get_local_folder(remotefolder)
|
||||
|
||||
# Write the mailboxes
|
||||
mbnames.add(account.name, localfolder.getname(),
|
||||
localrepos.getlocalroot())
|
||||
# Add the folder to the mbnames mailboxes.
|
||||
mbnames.add(account.name, localrepos.getlocalroot(),
|
||||
localfolder.getname())
|
||||
|
||||
# Load status folder.
|
||||
statusfolder = statusrepos.getfolder(remotefolder.getvisiblename().
|
||||
|
Reference in New Issue
Block a user