Subject: [PATCH] Fix copy-directory creating missing directory

From: Aaron Jensen <[email-masked]>
Date: Sun, 17 Sep 2017 12:15:13 -0700

* lisp/files.el (copy-directory): Use file-directory-p instead of
directory-name-p.
---
 lisp/files.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/files.el b/lisp/files.el
index c55c8097c1..b3a55af976 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5540,7 +5540,7 @@ copy-directory
       (setq directory (directory-file-name (expand-file-name directory))
 	    newname (expand-file-name newname))

-      (cond ((not (directory-name-p newname))
+      (cond ((not (file-directory-p newname))
 	     ;; If NEWNAME is not a directory name, create it;
 	     ;; that is where we will copy the files of DIRECTORY.
 	     (make-directory newname parents))
--
2.13.2