GNU bug report logs -
#1862
23.0.60; tar-mode on posix ustar
Previous Next
Reported by: Kevin Ryde <user42 <at> zip.com.au>
Date: Mon, 12 Jan 2009 00:45:03 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #15 received at 1862 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> 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 ... :-)
[tar-mode.el.rename-ustar.diff (text/x-diff, inline)]
*** 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))))
This bug report was last modified 16 years and 131 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.