From: Chong Yidong Date: Thu, 24 Jul 2008 16:12:20 +0000 (+0000) Subject: (dired-copy-file-recursive): Avoid calling X-Git-Tag: emacs-pretest-23.0.90~3917 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e6979d6e33ad4906fa09d414f0c7393fff306de5;p=emacs.git (dired-copy-file-recursive): Avoid calling set-file-modes when creating target directories. --- diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 8ebd796c2bd..7c4c29abb23 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1195,9 +1195,13 @@ Special value `always' suppresses confirmation." (if (file-exists-p to) (or top (dired-handle-overwrite to)) (condition-case err - (progn - (make-directory to) - (set-file-modes to #o700)) + ;; Create the directory with correct permissions. + (let ((default-mode (default-file-modes))) + (unwind-protect + (progn + (set-default-file-modes #o700) + (make-directory to)) + (set-default-file-modes default-mode))) (file-error (push (dired-make-relative from) dired-create-files-failures)