summaryrefslogtreecommitdiff
path: root/lisp/dired-aux.el
diff options
context:
space:
mode:
authorTino Calancha <tino.calancha@gmail.com>2017-02-27 16:26:06 +0900
committerTino Calancha <tino.calancha@gmail.com>2017-02-27 16:26:06 +0900
commit841e3e377c97142cfe76b9d91467f439198f5e39 (patch)
treebedab4128a289d0499420c8cdd0943966d24b490 /lisp/dired-aux.el
parentfd8f724147b0a64c15f42dd09d21d8b2f81f6cbc (diff)
downloademacs-841e3e377c97142cfe76b9d91467f439198f5e39.tar.gz
Choose the right target dir on dired operations
Prevent from changing the input target dir when dired-dwim-target is non-nil (Bug#25609). * lisp/dired-aux.el (dired-do-create-files): If dired-dwim-target is non-nil, then bind 'default' to nil. * test/lisp/dired-tests.el (dired-test-bug25609): Add test.
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r--lisp/dired-aux.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index caa3b45705b..d7ca0527879 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1791,6 +1791,7 @@ Optional arg HOW-TO determines how to treat the target.
(and (consp fn-list) (null (cdr fn-list)) (car fn-list)))
(target-dir (dired-dwim-target-directory))
(default (and dired-one-file
+ (not dired-dwim-target) ; Bug#25609
(expand-file-name (file-name-nondirectory (car fn-list))
target-dir)))
(defaults (dired-dwim-target-defaults fn-list target-dir))