changeset 13339:13b7b667b18f

(archive-zoo-summarize): Handle archives with long file names.
author Richard M. Stallman <rms@gnu.org>
date Mon, 30 Oct 1995 19:18:52 +0000
parents 0f082123d484
children 53bbedbefdb2
files lisp/arc-mode.el
diffstat 1 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/arc-mode.el	Mon Oct 30 18:01:22 1995 +0000
+++ b/lisp/arc-mode.el	Mon Oct 30 19:18:52 1995 +0000
@@ -1428,9 +1428,23 @@
              (modtime (archive-l-e (+ p 16) 2))
              (ucsize  (archive-l-e (+ p 20) 4))
 	     (namefld (buffer-substring (+ p 38) (+ p 38 13)))
-	     (fnlen   (or (string-match "\0" namefld) 13))
-	     (efnname (substring namefld 0 fnlen))
-	     (fiddle  (string= efnname (upcase efnname)))
+	     (dirtype (char-after (+ p 4)))
+	     (lfnlen  (if (= dirtype 2) (char-after (+ p 56)) 0))
+	     (ldirlen (if (= dirtype 2) (char-after (+ p 57)) 0))
+	     (fnlen   (+ ldirlen
+			 (if (> lfnlen 0)
+			     (1- lfnlen)
+			   (or (string-match "\0" namefld) 13))))
+	     (efnname (concat
+		       (if (> ldirlen 0)
+			   (concat (buffer-substring
+				    (+ p 58 lfnlen) (+ p 58 lfnlen ldirlen -1))
+				   "/")
+			 "")
+		       (if (> lfnlen 0)
+			   (buffer-substring (+ p 58) (+ p 58 lfnlen -1))
+			 (substring namefld 0 fnlen))))
+	     (fiddle  (and (= lfnlen 0) (string= efnname (upcase efnname))))
              (ifnname (if fiddle (downcase efnname) efnname))
              (text    (format "  %8d  %-11s  %-8s  %s"
                               ucsize