diff options
author | Richard M. Stallman <rms@gnu.org> | 2006-11-05 15:00:31 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2006-11-05 15:00:31 +0000 |
commit | 7a547817ccc5d36c0275f3e9533979f5145f0a80 (patch) | |
tree | 5f8234581dcb02641b6ce2e00c9a655a927b565c /lisp/dired-aux.el | |
parent | 785428c709c8c0c292909785aa84ea469e50bdb3 (diff) | |
download | emacs-7a547817ccc5d36c0275f3e9533979f5145f0a80.tar.gz |
(dired-copy-file-recursive): Catch errors
from recursive copies in the loop, around the recursive call.
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r-- | lisp/dired-aux.el | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 769d98c9530..257332f4495 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1182,12 +1182,20 @@ Special value `always' suppresses confirmation." dired-create-files-failures) (setq files nil) (dired-log "Copying error for %s:\n%s\n" from err))))) - (while files - (dired-copy-file-recursive - (expand-file-name (car files) from) - (expand-file-name (car files) to) - ok-flag preserve-time nil recursive) - (pop files))) + (dolist (file files) + (let ((thisfrom (expand-file-name file from)) + (thisto (expand-file-name file to))) + ;; Catch errors copying within a directory, + ;; and report them through the dired log mechanism + ;; just as our caller will do for the top level files. + (condition-case err + (dired-copy-file-recursive + thisfrom thisto + ok-flag preserve-time nil recursive) + (file-error + (push (dired-make-relative thisfrom) + dired-create-files-failures) + (dired-log "Copying error for %s:\n%s\n" thisfrom err)))))) ;; Not a directory. (or top (dired-handle-overwrite to)) (condition-case err @@ -1198,11 +1206,7 @@ Special value `always' suppresses confirmation." (file-date-error (push (dired-make-relative from) dired-create-files-failures) - (dired-log "Can't set date on %s:\n%s\n" from err)) - (file-error - (push (dired-make-relative from) - dired-create-files-failures) - (dired-log "Copying error for %s:\n%s\n" from err)))))) + (dired-log "Can't set date on %s:\n%s\n" from err)))))) ;;;###autoload (defun dired-rename-file (file newname ok-if-already-exists) |