- (when (string-match (car pair) group)
- (setq dir (nnmail-group-pathname
- (substring group (match-end 0))
- "/"))
- (push (cons (concat (cdr pair) (substring dir 1)) group)
+ (when (setq dir
+ (or (and (eq t (car pair))
+ (gnus-method-equal method gnus-select-method)
+ group)
+ (and (stringp (car pair))
+ (string-match (car pair) group)
+ (substring group (match-end 0)))))
+ (setq dir (nnmail-group-pathname dir "/"))
+ (push (cons (concat (cdr pair)
+ ;; nnmail-group-pathname() on some
+ ;; systems returns pathnames which
+ ;; have drive letters at their top.
+ (substring dir (1+ (string-match "/" dir))))
+ group)