[PATCH] Make -f option with with folder names with spaces.

Dan Christensen jdc at uwo.ca
Fri Apr 22 00:24:18 BST 2011


Sebastian Spaeth <Sebastian at SSpaeth.de> writes:

> On Fri, 08 Apr 2011 11:37:05 -0400, Dan Christensen <jdc at uwo.ca> wrote:
>> Can a foldername *start* with a space?  If so, maybe the strip should be
>> removed.
>
> Well, theoretically yes. *By convention*, mailbox names are specified in
> some weird UTF-7 encoding (ie, the specs leave the naming implementation
> specific :-(), so they could theoretically start with a space.

I think we should parse this in the simplest way possible, which is to
simply split on the commas and leave spaces as is.  Why limit how the
user can use this?

So this:

            foldernames = map(lambda s: s.strip(),
                              options.folders.split(","))

should be replaced with

            foldernames = options.folders.split(",")

Dan





More information about the OfflineIMAP-project mailing list