From b518f8190af1bdcf89437ac84ce3422f93c3c77a Mon Sep 17 00:00:00 2001 From: okada Date: Thu, 25 Apr 2002 23:24:26 +0000 Subject: [PATCH] * elmo-utils.el (elmo-make-directory): Add option. Default file mode is 700. --- elmo/ChangeLog | 5 +++++ elmo/elmo-util.el | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) 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." -- 1.7.10.4