* 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
|
@ -1,3 +1,8 @@
|
|||
2012-12-29 Matt Fidler <matt.fidler@alcon.com> (tiny change)
|
||||
|
||||
* emacs-lisp/package.el (package-untar-buffer): Handle problematic
|
||||
tarfile content listings (Bug#13136).
|
||||
|
||||
2012-12-29 Mark Lillibridge <mark.lillibridge@hp.com>
|
||||
|
||||
* mail/rmailmm.el (rmail-insert-mime-forwarded-message): Insert
|
||||
|
|
|
@ -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
Reference in a new issue