From: Carl Worth Date: Sat, 15 Aug 2009 04:29:43 +0000 (-0700) Subject: maildir: allow ', ' in the unique-name portion of a maildir filename X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=5d70f7b458d0e3100be62c9bffee9a8dfd4c0f50;p=sup maildir: allow ', ' in the unique-name portion of a maildir filename The maildir specification says the following about unique names: A unique name can be anything that doesn't contain a colon (or slash) and doesn't start with a dot. [http://cr.yp.to/proto/maildir.html] So disallowing a unique name to have a comma breaks maildir import on systems where there is a comma in the names. --- diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index c6577c1..a2dbae4 100644 --- a/lib/sup/maildir.rb +++ b/lib/sup/maildir.rb @@ -212,7 +212,7 @@ private def maildir_data msg fn = File.basename @ids_to_fns[msg] - fn =~ %r{^([^:,]+):([12]),([DFPRST]*)$} + fn =~ %r{^([^:]+):([12]),([DFPRST]*)$} [($1 || fn), ($2 || "2"), ($3 || "")] end