]> git.eshelyaron.com Git - emacs.git/commitdiff
(tar-rename-entry): Only test the magic string, without
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 16 Jan 2009 02:38:58 +0000 (02:38 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 16 Jan 2009 02:38:58 +0000 (02:38 +0000)
its version number, and then set both.

lisp/ChangeLog
lisp/tar-mode.el

index 86caa554a13bcfb42ab85e49b6a6e7c89a0b0b03..da963a00bae1e6faf08c7b2faac28aec954d1a40 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-16  Kevin Ryde  <user42@zip.com.au>
+
+       * tar-mode.el (tar-rename-entry): Only test the magic string, without
+       its version number, and then set both.
+
 2009-01-16  Richard M Stallman  <rms@gnu.org>
 
        * textmodes/paragraphs.el (sentence-end): Accept non-break space.
index 99a7303944a0f7dd8e063683e00008e0f84e0724..12c39117ddd6e037c232a15a916bd3ea7f4c3c00 100644 (file)
@@ -1053,8 +1053,8 @@ for this to be permanent."
                (string-match "/" encoded-new-name
                             (- (length encoded-new-name) 99))
               (< (match-beginning 0) 155))
-      (unless (equal (tar-header-magic descriptor) "ustar\0\0")
-        (tar-alter-one-field tar-magic-offset "ustar\0\0"))
+      (unless (equal (tar-header-magic descriptor) "ustar\0")
+        (tar-alter-one-field tar-magic-offset (concat "ustar\0" "00")))
       (setq prefix (substring encoded-new-name 0 (match-beginning 0)))
       (setq encoded-new-name (substring encoded-new-name (match-end 0))))