summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/package.el6
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))))