From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Date: Sat, 12 Feb 2011 22:55:28 +0000 (-0500)
Subject: Adapt dired-create-files to copy-directory changes.
X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~912
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9de31df2dde735136597d63eb8e2dcc844432c81;p=emacs.git

Adapt dired-create-files to copy-directory changes.

* dired-aux.el (dired-create-files): Adapt destination name to
match the new behavior of copy-directory.
---

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7cd39ae6d4b..d0529bc00f1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-12  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
+
+	* dired-aux.el (dired-create-files): Adapt destination name to
+	match the new behavior of copy-directory.
+
 2011-02-12  Chong Yidong  <cyd@stupidchicken.com>
 
 	* mail/mail-utils.el (mail-dont-reply-to-names): New variable,
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 6f33831eb38..cb1324051a7 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1383,6 +1383,10 @@ ESC or `q' to not overwrite any of the remaining files,
                   (cond  ((integerp marker-char) marker-char)
                          (marker-char (dired-file-marker from)) ; slow
                          (t nil))))
+	    (when (and (file-directory-p from)
+		       (file-directory-p to)
+		       (eq file-creator 'dired-copy-file))
+	      (setq to (file-name-directory to)))
             (condition-case err
                 (progn
                   (funcall file-creator from to dired-overwrite-confirmed)