* riece-log.el (riece-log-get-directory): Follow the change of
authorbg66 <bg66>
Thu, 23 Oct 2003 01:45:31 +0000 (01:45 +0000)
committerbg66 <bg66>
Thu, 23 Oct 2003 01:45:31 +0000 (01:45 +0000)
`riece-channel-regexp'.

lisp/ChangeLog
lisp/riece-log.el

index ce30160..b4e3438 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-23  OHASHI Akira  <bg66@koka-in.org>
+
+       * riece-log.el (riece-log-get-directory): Follow the change of
+       `riece-channel-regexp'.
+
 2003-10-22  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-identity.el (riece-format-identity): Return copied strings.
index 8d98e66..b4c801c 100644 (file)
@@ -82,16 +82,18 @@ If integer, flash back only this line numbers. t means all lines."
     (let ((map (assoc channel riece-log-directory-map)))
       (if map
          (expand-file-name (cdr map) riece-log-directory)
-       (if (string-match (concat riece-channel-regexp
-                                 "\\([^:]+\\)\\(:\\*\\.\\(.*\\)\\)?") channel)
-           (let ((name (match-string 1 channel))
-                 (suffix (match-string 3 channel)))
-             (let ((name (if suffix (concat name "-" suffix) name)))
-               (if server
-                   (expand-file-name
-                    name
-                    (expand-file-name server riece-log-directory))
-                 (expand-file-name name riece-log-directory))))
+       (if (string-match riece-channel-regexp channel)
+           (let ((name (substring channel
+                                  (match-end 1) (match-beginning 2)))
+                 (suffix (match-string 2 channel)))
+             (when (and (stringp suffix)
+                        (string-match "^:\\*\\.\\(.*\\)" suffix))
+               (setq name (concat name "-" (match-string 1 suffix))))
+             (if server
+                 (expand-file-name
+                  name
+                  (expand-file-name server riece-log-directory))
+               (expand-file-name name riece-log-directory)))
          riece-log-directory)))))
 
 (defun riece-log-flashback (identity)