From 3cfb886e3dfd1b6c645420a7eb912c4fd8def9ef Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 1 Aug 1994 07:15:34 +0000 Subject: [PATCH] (insert-directory): Gracefully handle the case where a file disappears between when it is listed in the directory and when the attributes are requested. --- lisp/ls-lisp.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index cd6c68b46b9..48a7616e445 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -105,12 +105,12 @@ The switches that work are: A a c i r S s t u" (ls-lisp-handle-switches file-alist switches)) (while file-alist (setq elt (car file-alist) - short (car elt) - attr (cdr elt) file-alist (cdr file-alist) - fil (concat dir short) - sum (+ sum (nth 7 attr))) - (insert (ls-lisp-format short attr switches))) + short (car elt) + attr (cdr elt)) + (and attr + (setq sum (+ sum (nth 7 attr))) + (insert (ls-lisp-format short attr switches)))) ;; Fill in total size of all files: (save-excursion (search-backward "total \007") -- 2.39.5