diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-03-21 09:15:25 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2021-03-21 09:15:25 +0100 |
commit | be22cda7be9e77e67f224f6f07cca9dd44aaa078 (patch) | |
tree | 6b2dea389571cdffdd7bd0594212ca28ea6e9154 /lisp/emacs-lisp/comp.el | |
parent | 6ca6c71cd0bf8fc970d9b1477ea61a670469f672 (diff) | |
download | emacs-be22cda7be9e77e67f224f6f07cca9dd44aaa078.tar.gz emacs-be22cda7be9e77e67f224f6f07cca9dd44aaa078.tar.bz2 emacs-be22cda7be9e77e67f224f6f07cca9dd44aaa078.zip |
* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all .eln dirs.
Diffstat (limited to 'lisp/emacs-lisp/comp.el')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 6da1a7979c3..ca4be0fe976 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3776,11 +3776,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 de 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. |