emacs-devel
[Top][All Lists]
Advanced

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

address@hidden: tar-mode gives "zero-length file" error]


From: Richard Stallman
Subject: address@hidden: tar-mode gives "zero-length file" error]
Date: Sun, 01 Jul 2007 12:32:36 -0400

Would someone please install this in Emacs 22 and the trunk,
and thank him, and ack?

------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY 
        autolearn=failed version=3.1.0
Date: Thu, 28 Jun 2007 13:29:53 -0400
To: address@hidden
From: Aaron Hawley <address@hidden>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Subject: tar-mode gives "zero-length file" error


Start Dired in /tmp:
  C-x d /tmp RET

Touch an empty file:
  M-! touch foo

Create a tar with the file:
  M-! tar cf foo.tar foo

Open the tar file with tar-mode:
  C-x C-f foo.tar RET

Try extracting the file:
  e

Get the message: "This is a zero-length file".  I'm not sure what the
safety concern is here, but here's the patch I propose:

- --- orig/lisp/tar-mode.el
+++ mod/lisp/tar-mode.el
@@ -667,7 +667,7 @@
                     ((eq link-p 38) "a volume header")
                     ((eq link-p 55) "an extended pax header")
                     (t "a link"))))
- -    (if (zerop size) (error "This is a zero-length file"))
+    (if (zerop size) (message "This is a zero-length file"))
     descriptor))
 
 (defun tar-mouse-extract (event)


In GNU Emacs 22.0.99.1 (i686-redhat-linux-gnu, GTK+ Version 2.10.8)
 of 2007-05-09 on hs20-bc2-2.build.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure  '--build=i686-redhat-linux-gnu'
'--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
'--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec'
'--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--with-pop' '--with-sound' '--with-gtk'
'build_alias=i686-redhat-linux-gnu' 'host_alias=i686-redhat-linux-gnu'
'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall
- -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
- --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic
- -fasynchronous-unwind-tables''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Tar

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
SPC f i l e : <return> <return> <backspace> SPC SPC 
M - ! C-a C-f C-f C-p C-p C-n C-n C-e SPC t a r SPC 
c f SPC f o o . t a r SPC f o o <return> <return> O 
p e n SPC f <backspace> t h e SPC f <backspace> t a 
r SPC f i l e SPC w i t h SPC t a r - m o d e : <return> 
<return> <backspace> SPC SPC C - x SPC C-x C-f C-g 
C-g C - f SPC f o o . t a r SPC R E T <return> <return> 
P r e s s SPC C-x C-f M-p M-p <return> C-h b C-x o 
C-v C-s e x t r C-s C-a C-x o e C-x k <return> C-a 
C-k E x t r a c C-a C-k T r y SPC a <backspace> e x 
t r a c t i n g SPC t h e SPC f i l e : <return> <return> 
<backspace> <tab> <backspace> <backspace> <backspace> 
<backspace> SPC SPC e <return> <return> G e t SPC t 
h e SPC m e s s a g e C-x o C-x b * M <tab> <return> 
C-a C-f C-f C-f C-f C-a C-f C-f C-f C-f C-k C-_ C-x 
o C-e : S-SPC " C-y " . ESC < C-x h M-w C-x h M-w C-x 
d / t m p <return> M-! t o u c h SPC f o o <return> 
M-! t a r SPC c f SPC f o o . t a r SPC f o o <return> 
C-x C-f f o o . t a r <return> e M-x r e p o r t SPC 
e m <tab> <return>

Recent messages:
Quit [2 times]
Mark saved where search started
if: 
undo-start: No undo information in this buffer
Mark set [6 times]
Directory has changed on disk; type g to update Dired
(Shell command succeeded with no output) [2 times]
Parsing tar file...done
if: This is a zero-length file
Loading emacsbug...done




_______________________________________________
emacs-pretest-bug mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------




reply via email to

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