[dev] ingo procmail patch

Ben Chavet ben at chavet.net
Wed Mar 3 11:13:16 PST 2004


The attatched patch for ingo/lib/Script/procmail.php escapes spaces in folder
names.

--Ben
-------------- next part --------------
Index: procmail.php
===================================================================
RCS file: /repository/ingo/lib/Script/procmail.php,v
retrieving revision 1.41
diff -u -r1.41 procmail.php
--- procmail.php	19 Feb 2004 22:27:39 -0000	1.41
+++ procmail.php	3 Mar 2004 18:51:03 -0000
@@ -552,12 +552,12 @@
             if (substr($folder, 0, 6) == 'INBOX.') {
                 $folder = substr($folder, 6);
             }
-            return '"$DEFAULT/.' . $folder . '/"';
+            return '"$DEFAULT/.' . str_replace(' ', '\ ', $folder) . '/"';
         } else {
             if (empty($folder) || ($folder == 'INBOX')) {
                 return '$DEFAULT';
             }
-            return $folder;
+            return str_replace(' ', '\ ', $folder);
         }
     }
 


More information about the dev mailing list