[PATCHv2 2/2] Re: Allow to create the root MailDir directory

Nicolas Sebrecht nicolas.s-dev at laposte.net
Wed Jun 8 16:15:53 BST 2011


On Mon, Jun 06, 2011 at 11:37:25AM +0200, Sebastian Spaeth wrote:
> 
> We currently do not allow nametrans rules such as
> nametrans = lambda foldername: re.sub('^INBOX$', '', foldername)
> 
> because we crash with a traceback when running:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499755
> 
> The underlying reason is that we cannot create the "top level" root
> directory of the Maildir in the function makefolders(), it will bail
> out. John Goerzen intentionally prevented offlineimap from creating the
> top-level dir, so that a misconfiguration could not arbitrarily create
> folders on the file system. I believe that it should be perfectly
> possible to automatically create the root dirctory of the maildir. We
> still protect against folder creations at arbitrary places in the file
> system though.
> 
> This patch cleans up makefolders(), adds documentation, allows to
> automatically create rootfolders if needed (using absolute paths) and
> adds some robustness in case the folders already exist that we want to
> create (rather than simply crapping out).

Merged; thanks.

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list