From: Kevin Ryde <user42@zip.com.au>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 1862@emacsbugs.donarmstrong.com
Subject: bug#1862: 23.0.60; tar-mode on posix ustar
Date: Fri, 16 Jan 2009 11:18:45 +1100 [thread overview]
Message-ID: <87bpu814t6.fsf_-_@blah.blah> (raw)
In-Reply-To: <handler.1862.D1862.12317315262970.notifdone@emacsbugs.donarmstrong.com> (Emacs bug Tracking System's message of "Mon, 12 Jan 2009 03:45:03 +0000")
[-- Attachment #1: Type: text/plain, Size: 506 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
> Indeed, the code didn't pay attention to the version field, but
> incorrectly clipped it out. I've installed a similar fix to yours, just
> a bit simpler.
Does tar-rename-entry have to notice the shorter magic-str now too?
Maybe something like the following, with the happy side effect of no
longer writing a \0 in the version field, rather digits 00 per posix.
Note totally untested!, as my build is in a rather broken state at the
moment ... :-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: tar-mode.el.rename-ustar.diff --]
[-- Type: text/x-diff, Size: 981 bytes --]
*** tar-mode.el 14 Jan 2009 07:53:50 +1100 1.136
--- tar-mode.el 16 Jan 2009 11:10:21 +1100
***************
*** 1053,1060 ****
(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"))
(setq prefix (substring encoded-new-name 0 (match-beginning 0)))
(setq encoded-new-name (substring encoded-new-name (match-end 0))))
--- 1053,1060 ----
(string-match "/" encoded-new-name
(- (length encoded-new-name) 99))
(< (match-beginning 0) 155))
! (unless (equal (tar-header-magic descriptor) "ustar\0")
! (tar-alter-one-field tar-magic-offset "ustar\0\060\060"))
(setq prefix (substring encoded-new-name 0 (match-beginning 0)))
(setq encoded-new-name (substring encoded-new-name (match-end 0))))
next prev parent reply other threads:[~2009-01-16 0:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <jwvy6xh9oug.fsf-monnier+emacsbugreports@gnu.org>
2009-01-12 0:37 ` bug#1862: 23.0.60; tar-mode on posix ustar Kevin Ryde
2009-01-12 3:45 ` bug#1862: marked as done (23.0.60; tar-mode on posix ustar) Emacs bug Tracking System
[not found] ` <handler.1862.D1862.12317315262970.notifdone@emacsbugs.donarmstrong.com>
2009-01-16 0:18 ` Kevin Ryde [this message]
2009-01-16 2:39 ` bug#1862: 23.0.60; tar-mode on posix ustar Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bpu814t6.fsf_-_@blah.blah \
--to=user42@zip.com.au \
--cc=1862@emacsbugs.donarmstrong.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).