1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-27 19:31:38 +00:00

(dired-copy-file-recursive): Avoid calling set-file-modes when

creating target directories.
This commit is contained in:
Chong Yidong 2008-07-24 16:16:00 +00:00
parent 0669768576
commit a1a7c9ab3c

View File

@ -1180,9 +1180,15 @@ 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))
;; We used to call set-file-modes here, but on some
;; Linux kernels, that returns an error on vfat
;; filesystems
(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)