branch: elpa-admin
commit 5d6ebc8422847cf37423edba9014eb8426d15a09
Author: Stefan Monnier <[email protected]>
Commit: Stefan Monnier <[email protected]>

    elpa-admin.el (elpaa--prune-old-tarballs): Fix last change
---
 elpa-admin.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index a856c8d169..e159a6c41f 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -649,8 +649,11 @@ returns.  Return the selected revision."
           (when (string-match "\\.\\(tar\\|el\\)\\'" file)
             ;; Make sure we don't delete the file we just created.
             (cl-assert (not (equal file (file-name-nondirectory tarball))))
-            (if (file-readable-p (concat file ".lz"))
-                (progn (push oldtarball deleted) (delete-file file))
+            (if (file-readable-p (expand-file-name (concat file ".lz") 
destdir))
+                (progn (push oldtarball deleted)
+                       (elpaa--message "Deleting non-compressed tarball: %s"
+                                       file)
+                       (delete-file (expand-file-name file destdir)))
               ;; FIXME: This should never happen.
               (message "!!Tarball without matching compressed file: %s" file)
               (elpaa--call nil "lzip" (expand-file-name file destdir))

Reply via email to