(elmo-archive-list-folders): Use `file-name-directory' if base folder
authorteranisi <teranisi>
Sat, 15 Apr 2000 05:38:53 +0000 (05:38 +0000)
committerteranisi <teranisi>
Sat, 15 Apr 2000 05:38:53 +0000 (05:38 +0000)
 does not exist.

elmo/elmo-archive.el

index eedc4c1..e1944ee 100644 (file)
@@ -423,6 +423,10 @@ TYPE specifies the archiver's symbol."
                                '(lambda (x) (regexp-quote (cdr x)))
                                elmo-archive-suffix-alist
                                "\\|"))))
+         (if (string-match "\\(.*\\)/$" base-folder) ; ends with '/'.
+             (setq base-folder (elmo-match-string 1 base-folder))
+           (unless (file-directory-p path)
+             (setq base-folder (file-name-directory base-folder))))
          (delq
           nil
           (mapcar
@@ -434,8 +438,7 @@ TYPE specifies the archiver's symbol."
                                       elmo-archive-suffix-alist))))
                 (format "$%s;%s%s"
                         (elmo-concat-path base-folder (elmo-match-string 1 x))
-                        suffix prefix)
-                ))
+                        suffix prefix)))
            flist)))
       (elmo-localdir-list-folders-subr folder hierarchy))))