]> git.cworth.org Git - sup/commitdiff
maildir: allow ', ' in the unique-name portion of a maildir filename
authorCarl Worth <cworth@cworth.org>
Sat, 15 Aug 2009 04:29:43 +0000 (21:29 -0700)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Tue, 18 Aug 2009 17:03:54 +0000 (13:03 -0400)
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.

lib/sup/maildir.rb

index c6577c17d48274a5abdc17367392245dd1b4dd01..a2dbae460f187a2d483b9307d032d47030df654e 100644 (file)
@@ -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