Complete.Org: Mailing Lists: Archives: offlineimap: July 2002:
Re: Dots in dir names
Home

Re: Dots in dir names

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Robert Flemming <flemming@xxxxxxxxxxxxx>
Cc: offlineimap@xxxxxxxxxxxx
Subject: Re: Dots in dir names
From: Martijn Pieters <mj@xxxxxxxx>
Date: Tue, 16 Jul 2002 14:47:57 -0400

On Tue, Jul 16, 2002 at 11:43:59AM -0700, Robert Flemming wrote:
> Maybe I'm missing something, but I seem to be having a problem with how my
> mail directories are being named in relation to how my mutt mailboxes file
> is expecting them to be.  The mutt mailbox file as generated by offlineimap
> is of the form:
> 
> mailboxes +spiralout.net/INBOX +spiralout.net/Mail/trash/trash-2002-07
> 
> The actual directories as created by offlineimap is:
> 
> ~/Mail/INBOX
> ~/Mail/Mail.trash.trash-2002-07

Yup, it's a known bug (John can we get a mailinglist archive? :)) and should
be fixed in the next release. 

Attached is a fix, such as John sent me when I reported the problem.

-- 
Martijn Pieters
| Software Engineer  mailto:mj@xxxxxxxx
| Zope Corporation   http://www.zope.com/
| Creators of Zope   http://www.zope.org/
---------------------------------------------


-- 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]