From: okada Date: Thu, 25 Apr 2002 23:24:26 +0000 (+0000) Subject: * elmo-utils.el (elmo-make-directory): Add option. X-Git-Tag: elmo-mark-root~198 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b518f8190af1bdcf89437ac84ce3422f93c3c77a;p=elisp%2Fwanderlust.git * elmo-utils.el (elmo-make-directory): Add option. Default file mode is 700. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index f4efd65..0c6c6b5 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2002-04-26 Kenichi OKADA + + * elmo-utils.el (elmo-make-directory): Add option. + Default file mode is 700. + 2002-04-17 Hiroya Murata * elmo-shimbun.el (elmo-folder-local-p): Defined. diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index a62e91a..a4840e2 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -710,14 +710,14 @@ Return value is a cons cell of (STRUCTURE . REST)" (setq last-modified (+ (* (nth 0 last-modified) (float 65536)) (nth 1 last-modified))))) -(defun elmo-make-directory (path) +(defun elmo-make-directory (path &optional mode) "Create directory recursively." (let ((parent (directory-file-name (file-name-directory path)))) (if (null (file-directory-p parent)) (elmo-make-directory parent)) (make-directory path) - (if (string= path (expand-file-name elmo-msgdb-directory)) - (set-file-modes path (+ (* 64 7) (* 8 0) 0))))) ; chmod 0700 + (set-file-modes path (or mode + (+ (* 64 7) (* 8 0) 0))))) ; chmod 0700 (defun elmo-delete-directory (path &optional no-hierarchy) "Delete directory recursively."