From c9c1460342a5aadf3819ceb6ee5ac28c14760fce Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 28 Jul 2021 18:10:59 +0200 Subject: [PATCH] Make byte-recompile-directory less brittle * lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Don't interpret files named "~" as $HOME (bug#49758). --- lisp/emacs-lisp/bytecomp.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 1b64a06fe42..a6e7e03cb0a 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1857,8 +1857,8 @@ also be compiled." (while directories (setq directory (car directories)) (message "Checking %s..." directory) - (dolist (file (directory-files directory)) - (let ((source (expand-file-name file directory))) + (dolist (source (directory-files directory t)) + (let ((file (file-name-nondirectory source))) (if (file-directory-p source) (and (not (member file '("RCS" "CVS"))) (not (eq ?\. (aref file 0))) -- 2.39.2