(tar-header-block-tokenize): Obey @LongLink even for
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 4 Jun 2009 20:48:16 +0000 (20:48 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 4 Jun 2009 20:48:16 +0000 (20:48 +0000)
POSIX tar archives (bug#3410).

lisp/ChangeLog
lisp/tar-mode.el

index 74ade15..ac0a752 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * tar-mode.el (tar-header-block-tokenize): Obey @LongLink even for
+       POSIX tar archives (bug#3410).
+
 2009-06-04  Johan Bockgård  <bojohan@gnu.org>
 
        * vc.el (vc-revision-other-window): Fix argument to backend
index 5da38db..e0c78c8 100644 (file)
@@ -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))