Commit af39894a authored by Matt Fidler's avatar Matt Fidler Committed by Chong Yidong

* emacs-lisp/package.el (package-untar-buffer): Handle problematic tarfile content listings.

Fixes: debbugs:13136
parent d5b1b1aa
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))))
......
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