(gnus-read-group): Added check to ask confirmation if
authorSimon Josefsson <jas@extundo.com>
Tue, 19 Aug 2003 23:32:27 +0000 (23:32 +0000)
committerSimon Josefsson <jas@extundo.com>
Tue, 19 Aug 2003 23:32:27 +0000 (23:32 +0000)
Group name contains invalid character. You can use '/' in IMAP,
but not in filenames. G m cannot know what the user is creating,
so let user decide. See thread m2oeysiev3.fsf@naima.lensflare.org.
Tiny patch from letters@hotpop.com (Jari Aalto+mail.linux).

lisp/ChangeLog
lisp/gnus.el

index 278ff89..28515f6 100644 (file)
@@ -1,3 +1,11 @@
+2003-08-20  Simon Josefsson  <jas@extundo.com>
+
+       * gnus.el (gnus-read-group): Added check to ask confirmation if
+       Group name contains invalid character. You can use '/' in IMAP,
+       but not in filenames. G m cannot know what the user is creating,
+       so let user decide. See thread m2oeysiev3.fsf@naima.lensflare.org.
+       Tiny patch from letters@hotpop.com (Jari Aalto+mail.linux).
+
 2003-08-13  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-score.el (gnus-summary-score-effect): Fix interactive use.
index 3077d0e..586d438 100644 (file)
@@ -3714,8 +3714,14 @@ Disallow invalid group names."
             (setq group (read-string (concat prefix prompt)
                                      (cons (or default "") 0)
                                      'gnus-group-history)))
-       (setq prefix (format "Invalid group name: \"%s\".  " group)
-             group nil)))
+       (let ((match (match-string 0 group)))
+         (unless (y-or-n-p
+                  (format
+                   "Name \"%s\" contain forbidden \"%s\" (see "
+                   "gnus-invalid-group-regexp).  Proceed? "
+                   group match))
+           (setq prefix (format "Invalid group name: \"%s\".  " group)
+                 group nil)))))
     group))
 
 (defun gnus-read-method (prompt)