]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/package.el: Don't load from parent dir
authorArtur Malabarba <bruce.connor.am@gmail.com>
Fri, 29 May 2015 20:41:53 +0000 (21:41 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Fri, 29 May 2015 20:41:53 +0000 (21:41 +0100)
(package-load-all-descriptors): Don't load descriptors from
directories above the package directories.

lisp/emacs-lisp/package.el

index 97e6bd63da994e43708452a4ef4da49e6abe7e31..6fecd9a837d0be25aa85ee271cd18206183dc98a 100644 (file)
@@ -587,9 +587,10 @@ updates `package-alist'."
   (dolist (dir (cons package-user-dir package-directory-list))
     (when (file-directory-p dir)
       (dolist (subdir (directory-files dir))
-        (let ((pkg-dir (expand-file-name subdir dir)))
-          (when (file-directory-p pkg-dir)
-            (package-load-descriptor pkg-dir)))))))
+        (unless (equal subdir "..")
+          (let ((pkg-dir (expand-file-name subdir dir)))
+            (when (file-directory-p pkg-dir)
+              (package-load-descriptor pkg-dir))))))))
 
 (defun define-package (_name-string _version-string
                                     &optional _docstring _requirements