From 9dacec4c446210bec3a172ffc0f0abbbf0eae274 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 14 Jan 2003 22:32:21 +0000 Subject: [PATCH] (archive-arc-rename-entry): Fix error message. (archive-lzh-summarize): Replace local var `path' with `dir'. (archive-unique-fname) [!MSDOS]: Avoid byte-compiler warning. --- lisp/ChangeLog | 4 ++++ lisp/arc-mode.el | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 691369ca587..9b86d8f49cf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,10 @@ (ido-copy-current-file-name, ido-wide-find-dirs-or-files): Don't use `path' as name of local variables holding a file name. + * arc-mode.el (archive-arc-rename-entry): Fix error message. + (archive-lzh-summarize): Rename local var `path' to `dir'. + (archive-unique-fname) [!MSDOS]: Avoid byte-compiler warning. + 2003-01-14 John Paul Wallington * apropos.el (apropos): Restore autoload cookie. Fix typo in diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 643ea6d5d39..95b47915cd7 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -789,8 +789,8 @@ using `make-temp-file', and the generated name is returned." (if (or alien (file-exists-p fullname)) (make-temp-file (expand-file-name - (if (and (fboundp 'msdos-long-file-names) - (not (msdos-long-file-names))) + (if (if (fboundp 'msdos-long-file-names) + (not (msdos-long-file-names))) "am" "arc-mode.") dir)) @@ -1386,7 +1386,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (defun archive-arc-rename-entry (archive newname descr) (if (string-match "[:\\\\/]" newname) - (error "File names in arc files may not contain a path")) + (error "File names in arc files must not contain a directory component")) (if (> (length newname) 12) (error "File names in arc files are limited to 12 characters")) (let ((name (concat newname (substring "\0\0\0\0\0\0\0\0\0\0\0\0\0" @@ -1426,7 +1426,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (width (string-width ifnname)) (p2 (+ p 22 fnlen)) (creator (if (>= (- hsize fnlen) 24) (char-after (+ p2 2)) 0)) - mode modestr uid gid text path prname + mode modestr uid gid text dir prname ) (if (= hdrlvl 0) (setq mode (if (= creator ?U) (archive-l-e (+ p2 8) 2) ?\666) @@ -1440,7 +1440,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (cond ((= etype 2) (let ((i (+ p3 3))) (while (< i (+ p3 hsize)) - (setq path (concat path + (setq dir (concat dir (if (= (char-after i) 255) "/" @@ -1454,7 +1454,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (setq p3 (+ p3 hsize)) (setq hsize (archive-l-e p3 2)) (setq etype (char-after (+ p3 2))))))) - (setq prname (if path (concat path ifnname) ifnname)) + (setq prname (if dir (concat dir ifnname) ifnname)) (setq modestr (if mode (archive-int-to-mode mode) "??????????")) (setq text (if archive-alternate-display (format " %8d %5S %5S %s" -- 2.39.2