]> git.eshelyaron.com Git - emacs.git/commitdiff
Make package-recompile delete all .elc files first
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 16 Jun 2022 12:25:47 +0000 (14:25 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 16 Jun 2022 12:25:47 +0000 (14:25 +0200)
* lisp/emacs-lisp/package.el (package-recompile): Delete all .elc
files under the package directory.

lisp/emacs-lisp/package.el

index ef46bd3a278aee3677c938716bc12db01662b25a..2c43db989935e1f76b8f6c2843c4ffa2113c05d5 100644 (file)
@@ -2437,7 +2437,8 @@ object."
     ;; Delete the old .elc files to ensure that we don't inadvertently
     ;; load them (in case they contain byte code/macros that are now
     ;; invalid).
-    (dolist (elc (directory-files (package-desc-dir pkg-desc) t "\\.elc\\'"))
+    (dolist (elc (directory-files-recursively
+                  (package-desc-dir pkg-desc) "\\.elc\\'"))
       (delete-file elc))
     (package--compile pkg-desc)))