From: teranisi Date: Sat, 15 Apr 2000 05:38:53 +0000 (+0000) Subject: (elmo-archive-list-folders): Use `file-name-directory' if base folder X-Git-Tag: wl-1_1_1~48 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a31aa3157425b79a1d4c905dfffdfb5ea966dd1e;p=elisp%2Fwanderlust.git (elmo-archive-list-folders): Use `file-name-directory' if base folder does not exist. --- diff --git a/elmo/elmo-archive.el b/elmo/elmo-archive.el index eedc4c1..e1944ee 100644 --- a/elmo/elmo-archive.el +++ b/elmo/elmo-archive.el @@ -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))))