Complete.Org: Mailing Lists: Archives: offlineimap: July 2002:
Re: Mailbox name recorder bug/missing feature
Home

Re: Mailbox name recorder bug/missing feature

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Martijn Pieters <mj@xxxxxxxx>
Cc: offlineimap@xxxxxxxxxxxx
Subject: Re: Mailbox name recorder bug/missing feature
From: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Date: Mon, 15 Jul 2002 19:52:33 -0500

On Mon, Jul 15, 2002 at 07:44:35PM -0500, John Goerzen wrote:
> I'm applying the attached patch for version 3.0.2 to fix the problem.

Wrong one.  Here's the real one :-)



-- Attached file included as plaintext by Ecartis --

Index: offlineimap.py
===================================================================
RCS file: /var/cvs/offlineimap/offlineimap.py,v
retrieving revision 1.50
diff -d -u -r1.50 offlineimap.py
--- offlineimap.py      15 Jul 2002 13:50:52 -0000      1.50
+++ offlineimap.py      16 Jul 2002 00:52:14 -0000
@@ -103,15 +103,8 @@
                                          config.getint(account, 
"maxconnections"))
 
 mailboxes = []
-mailboxlock = Lock()
 servers = {}
 
-def addmailbox(accountname, remotefolder):
-    mailboxlock.acquire()
-    mailboxes.append({'accountname' : accountname,
-                      'foldername': remotefolder.getvisiblename()})
-    mailboxlock.release()    
-    
 def syncaccount(accountname, *args):
     # We don't need an account lock because syncitall() goes through
     # each account once, then waits for all to finish.
@@ -160,12 +153,13 @@
 
 def syncfolder(accountname, remoterepos, remotefolder, localrepos,
                statusrepos):
-    mailboxes.append({'accountname': accountname,
-                      'foldername': remotefolder.getvisiblename()})
     # Load local folder.
     localfolder = localrepos.\
                   getfolder(remotefolder.getvisiblename().\
                             replace(remoterepos.getsep(), localrepos.getsep()))
+    # Write the mailboxes
+    mailboxes.append({'accountname': accountname,
+                      'foldername': localfolder.getvisiblename()})
     # Load local folder
     ui.syncingfolder(remoterepos, remotefolder, localrepos, localfolder)
     ui.loadmessagelist(localrepos, localfolder)




[Prev in Thread] Current Thread [Next in Thread]