diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-07-24 16:12:20 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-07-24 16:12:20 +0000 |
commit | e6979d6e33ad4906fa09d414f0c7393fff306de5 (patch) | |
tree | 04bb23e8159204bdef022ebe3095865bc9cbee17 /lisp | |
parent | e1ee73a8dab918b902356d5eb40eefc86bb8003c (diff) | |
download | emacs-e6979d6e33ad4906fa09d414f0c7393fff306de5.tar.gz |
(dired-copy-file-recursive): Avoid calling
set-file-modes when creating target directories.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/dired-aux.el | 10 |
1 files changed, 7 insertions, 3 deletions
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) |