[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28483: [PATCH] Fix copy-directory creating missing directory

From: Philipp Stephani
Subject: bug#28483: [PATCH] Fix copy-directory creating missing directory
Date: Sun, 17 Sep 2017 19:48:44 +0000

Aaron Jensen <address@hidden> schrieb am So., 17. Sep. 2017 um 21:16 Uhr:
* lisp/files.el (copy-directory): Use file-directory-p instead of
 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))

This would reintroduce the security hole that e22794867d878d53675fcc91d2ef1ad2494a2ff2 fixed.

Paul, maybe you want to add some comments to the places where you introduced `directory-name-p' so that people don't attempt to revert these changes?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]