Commit 08212929 authored by Tino Calancha's avatar Tino Calancha

* lisp/emacs-lisp/package.el (package-delete): Delete readme file as well.

parent b0b02ca7
......@@ -2128,10 +2128,15 @@ If NOSAVE is non-nil, the package is not removed from
(t
(add-hook 'post-command-hook #'package-menu--post-refresh)
(delete-directory dir t t)
;; Remove NAME-VERSION.signed file.
(let ((signed-file (concat dir ".signed")))
(if (file-exists-p signed-file)
(delete-file signed-file)))
;; Remove NAME-VERSION.signed and NAME-readme.txt files.
(dolist (suffix '(".signed" "readme.txt"))
(let* ((version (package-version-join (package-desc-version pkg-desc)))
(file (concat (if (string= suffix ".signed")
dir
(substring dir 0 (- (length version))))
suffix)))
(when (file-exists-p file)
(delete-file file))))
;; Update package-alist.
(let ((pkgs (assq name package-alist)))
(delete pkg-desc pkgs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment