* emacs-lisp/package.el (package-untar-buffer): Handle problematic tarfile content listings.
Fixes: debbugs:13136
This commit is contained in:
parent
d5b1b1aa9c
commit
af39894ab4
2 changed files with 10 additions and 1 deletions
|
@ -604,7 +604,11 @@ untar into a directory named DIR; otherwise, signal an error."
|
|||
(require 'tar-mode)
|
||||
(tar-mode)
|
||||
;; Make sure everything extracts into DIR.
|
||||
(let ((regexp (concat "\\`" (regexp-quote dir) "/")))
|
||||
(let ((regexp (concat "\\`" (regexp-quote dir)
|
||||
;; Tarballs created by some utilities don't
|
||||
;; list directories with a trailing slash
|
||||
;; (Bug#13136).
|
||||
"\\(/\\|\\'\\)")))
|
||||
(dolist (tar-data tar-parse-info)
|
||||
(unless (string-match regexp (aref tar-data 2))
|
||||
(error "Package does not untar cleanly into directory %s/" dir))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue