mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Signal an error in dired when moving to a directory that doesn't exist
* lisp/dired-aux.el (dired-do-create-files): Give an error when apparently moving to a directory name, and that directory doesn't exist (bug#38707).
This commit is contained in:
parent
361baa451a
commit
66bdf77adf
1 changed files with 4 additions and 0 deletions
|
|
@ -1978,6 +1978,10 @@ Optional arg HOW-TO determines how to treat the target.
|
|||
(apply (car into-dir) operation rfn-list fn-list target (cdr into-dir))
|
||||
(if (not (or dired-one-file into-dir))
|
||||
(error "Marked %s: target must be a directory: %s" operation target))
|
||||
(if (and (not (file-directory-p (car fn-list)))
|
||||
(not (file-directory-p target))
|
||||
(directory-name-p target))
|
||||
(error "%s: Target directory does not exist: %s" operation target))
|
||||
;; rename-file bombs when moving directories unless we do this:
|
||||
(or into-dir (setq target (directory-file-name target)))
|
||||
(dired-create-files
|
||||
|
|
|
|||
Loading…
Reference in a new issue