summaryrefslogtreecommitdiff
path: root/lisp/arc-mode.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2003-05-23 12:45:49 +0000
committerRichard M. Stallman <rms@gnu.org>2003-05-23 12:45:49 +0000
commita28fe04bbd2585275fa0b2b5961f5de47304d36d (patch)
treecfcf2f6cc284e25efeb439349eec1f6a94d79700 /lisp/arc-mode.el
parentd547e25f451cc3658cff147bcc0f0508322b6022 (diff)
downloademacs-a28fe04bbd2585275fa0b2b5961f5de47304d36d.tar.gz
(archive-lzh-summarize): Calculate correct total
header size for LZH level 1 header.
Diffstat (limited to 'lisp/arc-mode.el')
-rw-r--r--lisp/arc-mode.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 5b6e14d58db..563b71f940e 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -1416,7 +1416,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(while (progn (goto-char p) ;beginning of a base header.
(looking-at "\\(.\\|\n\\)\\(.\\|\n\\)-l[hz][0-9ds]-"))
(let* ((hsize (char-after p)) ;size of the base header (level 0 and 1)
- (csize (archive-l-e (+ p 7) 4)) ;size of a compressed file to follow.
+ (csize (archive-l-e (+ p 7) 4)) ;size of a compressed file to follow (level 0 and 2),
+ ;size of extended headers + the compressed file to follow (level 1).
(ucsize (archive-l-e (+ p 11) 4)) ;size of an uncompressed file.
(time1 (archive-l-e (+ p 15) 2)) ;date/time (MSDOS format in level 0, 1 headers
(time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.)
@@ -1515,8 +1516,12 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(length text))
visual)
files (cons (vector prname ifnname fiddle mode (1- p))
- files)
- p (+ p thsize 2 csize))))
+ files))
+ (cond ((= hdrlvl 1)
+ (setq p (+ p hsize 2 csize)))
+ ((or (= hdrlvl 2) (= hdrlvl 0))
+ (setq p (+ p thsize 2 csize))))
+ ))
(goto-char (point-min))
(set-buffer-multibyte default-enable-multibyte-characters)
(let ((dash (concat (if archive-alternate-display