[PATCH 2/9] Re: Replace 2 regexes with a single one

Nicolas Sebrecht nicolas.s-dev at laposte.net
Thu Apr 28 16:44:35 UTC 2011


On Thu, Apr 28, 2011 at 03:48:09PM +0200, Sebastian Spaeth wrote:
> On Wed, 27 Apr 2011 18:32:34 +0200, Nicolas Sebrecht wrote:
> 
> > It sucks. Well, not you comment which is pretty sensible but our
> > behaviour sucks. How could we even support folder creation on IMAP
> > server with such rules some day?
> > 
> > I think we should simply ignore/skip "." folder names and warn.
> 
> I am sure there is a reason why that thing was added there in the first
> place and I have no doubt there are broken IMAP implementations out
> there that used those.
> 
> It would be nice to output a warning when we see such behavior, so that
> we can at least document which IMAP servers are broken in what ways.

This looks like modified by John himself back in Fri Apr 18, 2003 so let
ask him if he remembers. The commit faf2600 don't help much.

Hi John,

To be brief, there's a treatment we'd like to understand why it's there.
The offlineimap/repository/LocalStatus.py file has

  def getfolderfilename(self, foldername):
      foldername = re.sub('^\.$', 'dot', foldername)
      return os.path.join(self.directory, foldername)

We understand that "." directores may be a problem but did you hit this
case or did introduce it to be safe?

We may change behaviour to ignore/skip such foldername and warn.

Thanks.

-- 
Nicolas Sebrecht



More information about the OfflineIMAP-project mailing list