Complete.Org: Mailing Lists: Archives: offlineimap: December 2007:
patch to prevent mkdir '.'
Home

patch to prevent mkdir '.'

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: patch to prevent mkdir '.'
From: "David L. Emerson" <demerson3x@xxxxxxxxxxxxx>
Date: Thu, 27 Dec 2007 11:52:27 -0800

I was having trouble getting offlineimap to play nice with dovecot and 
kmail, and I ended up making an oddball nametrans that changes the name 
of the inbox folder to '.'
dovecot_kmail_re = re.compile('^\.?(inbox[./])?', re.IGNORECASE)
# fn is folder name
def fix_dovecot_kmail (fn):
    if fn.lower() in ('inbox', '.inbox', '.'):
        return '.'
    return dovecot_kmail_re.sub('.INBOX.', fn, 1)


The trouble is that offlineimap attempts to create the directory '.' and 
crashes out. The following patch to offlineimap/repository/Maildir.py 
fixes such a problem

(I've never used diff patches before, so hopefully this is proper)

As englightening as that was, I don't think I have the expertise yet to 
make a patch that scans all folders before deleting/transferring and 
uses the imap copy command to reduce bandwidth usage for gmail, etc. :D

Maybe someday

~David.


-- Binary/unsupported file stripped by Ecartis --
-- Type: text/x-diff
-- File: patch.offlineimap_5.99.4




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