diff options
author | Matt Fidler <matt.fidler@alcon.com> | 2012-12-29 18:26:14 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-12-29 18:26:14 +0800 |
commit | af39894ab4b8a68eef14b39c030577b419a582a8 (patch) | |
tree | 8a3ca7b7bb98c86e148954d53b6292ad26db623f /lisp/emacs-lisp | |
parent | d5b1b1aa9c12d3f14692fe9baf18e0997a019fe3 (diff) | |
download | emacs-af39894ab4b8a68eef14b39c030577b419a582a8.tar.gz emacs-af39894ab4b8a68eef14b39c030577b419a582a8.tar.bz2 emacs-af39894ab4b8a68eef14b39c030577b419a582a8.zip |
* emacs-lisp/package.el (package-untar-buffer): Handle problematic tarfile content listings.
Fixes: debbugs:13136
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/package.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 6629410a1f1..54d133b166c 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -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)))) |