[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 1ad0ece 2/4: * lisp/emacs-lisp/comp.el (comp-clean-u
From: |
Andrea Corallo |
Subject: |
feature/native-comp 1ad0ece 2/4: * lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all .eln dirs. |
Date: |
Sun, 4 Apr 2021 16:52:39 -0400 (EDT) |
branch: feature/native-comp
commit 1ad0ecea2bbdfad9b543315a0ab28abcbfb1272f
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all .eln dirs.
---
lisp/emacs-lisp/comp.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 7f41a97..dfb945b 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3785,11 +3785,14 @@ sharing the original source filename (including FILE)."
with filename-hash = (match-string 1 file)
with regexp = (rx-to-string
`(seq "-" ,filename-hash "-" (1+ hex) ".eln" eos))
- for dir in (butlast (comp-eln-load-path-eff)) ; Skip last dir.
+ for dir in (comp-eln-load-path-eff)
do (cl-loop
for f in (when (file-exists-p dir)
(directory-files dir t regexp t))
- do (comp-delete-or-replace-file f)))))
+ ;; We may not be able to delete the file if we have no write
+ ;; permisison.
+ do (ignore-error file-error
+ (comp-delete-or-replace-file f))))))
(defun comp-delete-or-replace-file (oldfile &optional newfile)
"Replace OLDFILE with NEWFILE.