From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.bugs Subject: bug#1862: 23.0.60; tar-mode on posix ustar Date: Fri, 16 Jan 2009 11:18:45 +1100 Message-ID: <87bpu814t6.fsf_-_@blah.blah> References: <87vdsltl54.fsf@blah.blah> Reply-To: Kevin Ryde , 1862@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1232066651 27860 80.91.229.12 (16 Jan 2009 00:44:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2009 00:44:11 +0000 (UTC) Cc: 1862@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 16 01:45:22 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LNcpt-0002KU-SX for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Jan 2009 01:45:22 +0100 Original-Received: from localhost ([127.0.0.1]:44545 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNcod-0007QV-VV for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Jan 2009 19:44:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNcoA-00076q-D9 for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 19:43:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNco7-00074M-VX for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 19:43:33 -0500 Original-Received: from [199.232.76.173] (port=48232 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNco7-000749-SG for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 19:43:31 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34391) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNco6-0000EH-JA for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 19:43:30 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0G0hQmK018082; Thu, 15 Jan 2009 16:43:28 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0G0P8o4012744; Thu, 15 Jan 2009 16:25:08 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kevin Ryde Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 16 Jan 2009 00:25:07 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1862 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1862-submit@emacsbugs.donarmstrong.com id=B1862.123206515610914 (code B ref 1862); Fri, 16 Jan 2009 00:25:07 +0000 Original-Received: (at 1862) by emacsbugs.donarmstrong.com; 16 Jan 2009 00:19:16 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mailout2.pacific.net.au (mailout2-5.pacific.net.au [61.8.2.228]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0G0JCZA010895 for <1862@emacsbugs.donarmstrong.com>; Thu, 15 Jan 2009 16:19:14 -0800 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 717E31240A1; Fri, 16 Jan 2009 11:19:11 +1100 (EST) Original-Received: from blah.blah (ppp235E.dyn.pacific.net.au [61.8.35.94]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id C111B2740B; Fri, 16 Jan 2009 11:19:10 +1100 (EST) Original-Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1LNcQA-0002FJ-8V; Fri, 16 Jan 2009 11:18:46 +1100 In-Reply-To: (Emacs bug Tracking System's message of "Mon, 12 Jan 2009 03:45:03 +0000") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Thu, 15 Jan 2009 19:43:33 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24183 Archived-At: --=-=-= Stefan Monnier 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 ... :-) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=tar-mode.el.rename-ustar.diff *** 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)))) --=-=-=--