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.