]> git.eshelyaron.com Git - emacs.git/commitdiff
(tar-header-block-tokenize): Properly ignore the version
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 12 Jan 2009 03:37:13 +0000 (03:37 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 12 Jan 2009 03:37:13 +0000 (03:37 +0000)
subfield of the magic string.

lisp/ChangeLog
lisp/tar-mode.el

index c337e97aaa60ea7360614da28ec9128871e6435c..30ba38045440930422213ad31e12cb0303dad9a7 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * tar-mode.el (tar-header-block-tokenize): Properly ignore the version
+       subfield of the magic string.
+
 2009-01-11  Jay Belanger  <jay.p.belanger@gmail.com>
 
        * calc/calc-lang.el (math-compose-tex-sqrt): New function.
        (follow-update-window-start, follow-select-if-visible)
        (follow-calculate-first-window-start-from-below)
        (follow-post-command-hook): Code cleanup.
-       (follow-downward, follow-calculate-first-window-start): Function
-       deleted and merged into follow-redisplay.
+       (follow-downward, follow-calculate-first-window-start):
+       Delete function and merge into follow-redisplay.
        (follow-redisplay): Merge code from follow-downward and
        follow-calculate-first-window-start.
 
 
 2008-12-29  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
 
-       * proced.el (proced-temp-alist): Renamed from variable
+       * proced.el (proced-temp-alist): Rename from variable
        proced-children-alist.
        (proced-process-tree, proced-toggle-tree): Fix docstring.
        (proced-tree): Fix docstring.  Simplify.  Use proced-temp-alist.
 
 2008-12-28  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
 
-       * proced.el (proced-grammar-alist): Allow predicate nil.  New
-       attribute tree.
+       * proced.el (proced-grammar-alist): Allow predicate nil.
+       New attribute tree.
        (proced-format-alist): Use attribute tree.
        (proced-tree-flag, proced-tree-indent): New variables.
-       (proced-children-alist): Renamed from proced-process-tree.  PPID
-       must refer to a process in process-alist.  Ignore PPIDs that equal
-       PID (Bug#1718).  Children alist inherits sorting order from
-       process-alist.
+       (proced-children-alist): Rename from proced-process-tree.
+       PPID must refer to a process in process-alist.
+       Ignore PPIDs that equal PID (Bug#1718).
+       Children alist inherits sorting order from process-alist.
        (proced-process-tree): New variable.  New function.
        (proced-process-tree-internal, proced-toggle-tree)
-       (proced-tree, proced-tree-insert, proced-format-tree): New
-       functions.
+       (proced-tree, proced-tree-insert, proced-format-tree): New functions.
        (proced-mark-process-alist): Add docstring.
        (proced-filter-parents): PPID must refer to a process in
        process-alist.  Ignore PPIDs that equal PID (Bug#1718).
        (proced-sort): Throw error if attribute is not sortable.
-       (proced-sort-interactive): Restrict completion to sortable
-       attributes.
+       (proced-sort-interactive): Restrict completion to sortable attributes.
        (proced-format): Include tree in standard attributes if
        proced-tree-flag is non-nil.  Make header clickable only if
        corresponding predicate is non-nil.
        * startup.el (command-line): Do not mention the server name in
        case the user has not mentioned it, print a more explicit message.
 
-       * vc-dir.el (vc-dir-at-event): Rename from vc-at-event.  Change
-       all callers.
+       * vc-dir.el (vc-dir-at-event): Rename from vc-at-event.
+       Change all callers.
 
 2008-12-18  Sam Steingold  <sds@gnu.org>
 
 
 2008-12-17  Daiki Ueno  <ueno@unixuser.org>
 
-       * epa-file.el (epa-file-insert-file-contents): Set
-       buffer-file-name before decrypting a file.
+       * epa-file.el (epa-file-insert-file-contents):
+       Set buffer-file-name before decrypting a file.
 
 2008-12-16  Juanma Barranquero  <lekktu@gmail.com>
 
 
 2008-12-14  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
 
-       * proced.el (proced-auto-update-interval): Renamed from
+       * proced.el (proced-auto-update-interval): Rename from
        proced-timer-interval.
-       (proced-auto-update-flag): Renamed from proced-timer-flag.
-       (proced-auto-update-timer): Renamed from proced-timer.
-       (proced-toggle-auto-update): Renamed from
-       proced-toggle-timer-flag.
+       (proced-auto-update-flag): Rename from proced-timer-flag.
+       (proced-auto-update-timer): Rename from proced-timer.
+       (proced-toggle-auto-update): Rename from proced-toggle-timer-flag.
        (proced-available): Initialize appropriately.
 
 2008-12-13  Glenn Morris  <rgm@gnu.org>
index 7e091d8d038a15b9e0e7ee193767987fdfc61134..99a7303944a0f7dd8e063683e00008e0f84e0724 100644 (file)
@@ -239,8 +239,13 @@ write-date, checksum, link-type, and link-name."
              (gname-end (1- tar-dmaj-offset))
              (link-p (aref string tar-linkp-offset))
              (magic-str (substring string tar-magic-offset
-                                   (1- tar-uname-offset)))
-             (uname-valid-p (car (member magic-str '("ustar  " "ustar\0\0"))))
+                                  ;; The magic string is actually 6bytes
+                                  ;; of magic string plus 2bytes of version
+                                  ;; which we here ignore.
+                                   (- tar-uname-offset 2)))
+            ;; The magic string is "ustar\0" for POSIX format, and
+            ;; "ustar " for GNU Tar's format.
+             (uname-valid-p (car (member magic-str '("ustar " "ustar\0"))))
              name linkname
              (nulsexp   "[^\000]*\000"))
         (when (string-match nulsexp string tar-name-offset)
@@ -256,7 +261,7 @@ write-date, checksum, link-type, and link-name."
                          nil
                        (- link-p ?0)))
         (setq linkname (substring string tar-link-offset link-end))
-        (when (and (equal uname-valid-p "ustar\0\0")
+        (when (and (equal uname-valid-p "ustar\0")
                    (string-match nulsexp string tar-prefix-offset)
                    (> (match-end 0) (1+ tar-prefix-offset)))
           (setq name (concat (substring string tar-prefix-offset
@@ -271,7 +276,7 @@ write-date, checksum, link-type, and link-name."
             (setq link-p 5))            ; directory
 
         (if (and (equal name "././@LongLink")
-                 (equal magic-str "ustar  ")) ;OLDGNU_MAGIC.
+                 (equal magic-str "ustar ")) ;OLDGNU_MAGIC.
             ;; This is a GNU Tar long-file-name header.
             (let* ((size (tar-parse-octal-integer
                           string tar-size-offset tar-time-offset))