summaryrefslogtreecommitdiff
path: root/lisp/tar-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2009-06-04 20:48:16 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2009-06-04 20:48:16 +0000
commite66f4dfb7555eed2da7b2632f9dd87a793226127 (patch)
treebca926543fade0cc9a7fb16d86f0dc350e6e952c /lisp/tar-mode.el
parentbea2e9691dfe67fde382a689ca2f7d3a33889d43 (diff)
downloademacs-e66f4dfb7555eed2da7b2632f9dd87a793226127.tar.gz
(tar-header-block-tokenize): Obey @LongLink even for
POSIX tar archives (bug#3410).
Diffstat (limited to 'lisp/tar-mode.el')
-rw-r--r--lisp/tar-mode.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 5da38db052b..e0c78c8b781 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -276,7 +276,10 @@ write-date, checksum, link-type, and link-name."
(setq link-p 5)) ; directory
(if (and (equal name "././@LongLink")
- (equal magic-str "ustar ")) ;OLDGNU_MAGIC.
+ ;; Supposedly @LongLink is only used for GNUTAR
+ ;; format (i.e. "ustar ") but some POSIX Tar files
+ ;; (with "ustar\0") have been seen using it as well.
+ (member magic-str '("ustar " "ustar\0")))
;; This is a GNU Tar long-file-name header.
(let* ((size (tar-parse-octal-integer
string tar-size-offset tar-time-offset))