From: Richard M. Stallman Date: Mon, 1 Aug 1994 07:15:34 +0000 (+0000) Subject: (insert-directory): Gracefully handle the case X-Git-Tag: emacs-19.34~7444 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3cfb886e3dfd1b6c645420a7eb912c4fd8def9ef;p=emacs.git (insert-directory): Gracefully handle the case where a file disappears between when it is listed in the directory and when the attributes are requested. --- 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")