bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3410: marked as done (tar mode fails to open many valid files)


From: Emacs bug Tracking System
Subject: bug#3410: marked as done (tar mode fails to open many valid files)
Date: Thu, 04 Jun 2009 21:55:05 +0000

Your message dated Thu, 04 Jun 2009 16:48:56 -0400
with message-id <address@hidden>
and subject line Re: bug#3410: tar mode fails to open many valid files
has caused the Emacs bug report #3410,
regarding tar mode fails to open many valid files
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact address@hidden
immediately.)


-- 
3410: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3410
Emacs Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: tar mode fails to open many valid files Date: Thu, 28 May 2009 17:05:14 +0300 User-agent: KMail/1.10.1 (Linux/2.6.27.5-117.fc10.i686; KDE/4.1.2; i686; ; )
When I open a 'tar.gz' file in Emacs, it quite often fails with a
message similar to:

    File mode specification error: (error
    "ntWorkbookBuilder.SheetRecordCollectingListener.html\"
    title=\"class in org.apache.poi.hssf.eventuserm has size
    -137265917 - corrupted")

E.g. file at

    
http://apache.promotionalpro.com/poi/dev/bin/poi-bin-3.5-beta5-20090219.tar.gz

exhibits this error.  It can be extracted without problems with 'tar
-xzf ...' at command line, so it must be a bug in Emacs' tar mode.
Maybe it is too strict or doesn't handle some extension properly.

Paul


--- End Message ---
--- Begin Message --- Subject: Re: bug#3410: tar mode fails to open many valid files Date: Thu, 04 Jun 2009 16:48:56 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux)
> I.e. it works fine with
>    emacs -Q ~/tmp/poi-bin-3.5-beta5-20090219.tar.gz
> but shows your problem with
>    emacs -Q -f url-handler-mode; C-x C-f http://.../poi... RET

In the end you were right, and I have no idea how I managed to get the
above results.  url-handler-mode makes no difference, and the 64bit
thingy makes a difference (it somehow hides the bug, so it doesn't
signal an error but instead misinterprets the middle of the tar file,
while the beginning and the end are still just fine, so my cursory check
didn't see the corruption).

I've just installed the patch below, which should fix the problem,


        Stefan


--- tar-mode.el.~1.139.~        2009-03-20 16:24:31.000000000 -0400
+++ tar-mode.el 2009-06-04 16:41:49.000000000 -0400
@@ -276,7 +276,10 @@
             (setq link-p 5))            ; directory
 
         (if (and (equal name "././@LongLink")
-                 (equal magic-str "ustar ")) ;OLDGNU_MAGIC.
+                 ;; Supposedly @LongLink is only used for GNUTAR
+                 ;; format (i.e. "ustar ") but some POSIX Tar files
+                 ;; (with "ustar\0") have been seen using it as well.
+                 (member magic-str '("ustar " "ustar\0")))
             ;; This is a GNU Tar long-file-name header.
             (let* ((size (tar-parse-octal-integer
                           string tar-size-offset tar-time-offset))

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]