diff options
| author | Chong Yidong | 2007-04-16 19:40:14 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-04-16 19:40:14 +0000 |
| commit | bdbfe3bfd60b514733b77cfd7debe66e1b3a60f8 (patch) | |
| tree | b7b3ee3350e61da83db6a1a9cce413fa2432bd49 | |
| parent | 3dd29719316e58613166b9b9b84675c93776a725 (diff) | |
| download | emacs-bdbfe3bfd60b514733b77cfd7debe66e1b3a60f8.tar.gz emacs-bdbfe3bfd60b514733b77cfd7debe66e1b3a60f8.zip | |
(archive-lzh-summarize): Only apply the "downcase if all upcase" rule
to OS-ID 0 "generic". Always downcase for OS-ID M "MSDOS".
| -rw-r--r-- | lisp/arc-mode.el | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 1b0f3a3d584..8630d3e8b06 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -1415,7 +1415,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1415 | (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) | 1415 | (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) |
| 1416 | (hdrlvl (char-after (+ p 20))) ;header level | 1416 | (hdrlvl (char-after (+ p 20))) ;header level |
| 1417 | thsize ;total header size (base + extensions) | 1417 | thsize ;total header size (base + extensions) |
| 1418 | fnlen efnname fiddle ifnname width p2 | 1418 | fnlen efnname osid fiddle ifnname width p2 |
| 1419 | neh ;beginning of next extension header (level 1 and 2) | 1419 | neh ;beginning of next extension header (level 1 and 2) |
| 1420 | mode modestr uid gid text dir prname | 1420 | mode modestr uid gid text dir prname |
| 1421 | gname uname modtime moddate) | 1421 | gname uname modtime moddate) |
| @@ -1474,7 +1474,22 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1474 | (setq thsize (- neh p)))) | 1474 | (setq thsize (- neh p)))) |
| 1475 | (if (= hdrlvl 0) ;total header size | 1475 | (if (= hdrlvl 0) ;total header size |
| 1476 | (setq thsize hsize)) | 1476 | (setq thsize hsize)) |
| 1477 | (setq fiddle (if efnname (string= efnname (upcase efnname)))) | 1477 | ;; OS ID field not present in level 0 header, use code 0 "generic" |
| 1478 | ;; in that case as per lha program header.c get_header() | ||
| 1479 | (setq osid (cond ((= hdrlvl 0) 0) | ||
| 1480 | ((= hdrlvl 1) (char-after (+ p 22 fnlen 2))) | ||
| 1481 | ((= hdrlvl 2) (char-after (+ p 23))))) | ||
| 1482 | ;; Filename fiddling must follow the lha program, otherwise the name | ||
| 1483 | ;; passed to "lha pq" etc won't match (which for an extract silently | ||
| 1484 | ;; results in no output). As of version 1.14i it goes from the OS ID, | ||
| 1485 | ;; - For 'M' MSDOS: msdos_to_unix_filename() downcases always, and | ||
| 1486 | ;; converts "\" to "/". | ||
| 1487 | ;; - For 0 generic: generic_to_unix_filename() downcases if there's | ||
| 1488 | ;; no lower case already present, and converts "\" to "/". | ||
| 1489 | ;; - For 'm' MacOS: macos_to_unix_filename() changes "/" to ":" and | ||
| 1490 | ;; ":" to "/" | ||
| 1491 | (setq fiddle (cond ((= ?M osid) t) | ||
| 1492 | ((= 0 osid) (string= efnname (upcase efnname))))) | ||
| 1478 | (setq ifnname (if fiddle (downcase efnname) efnname)) | 1493 | (setq ifnname (if fiddle (downcase efnname) efnname)) |
| 1479 | (setq prname (if dir (concat dir ifnname) ifnname)) | 1494 | (setq prname (if dir (concat dir ifnname) ifnname)) |
| 1480 | (setq width (if prname (string-width prname) 0)) | 1495 | (setq width (if prname (string-width prname) 0)) |