summaryrefslogtreecommitdiff
path: root/lisp/ls-lisp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-08-01 07:15:34 +0000
committerRichard M. Stallman <rms@gnu.org>1994-08-01 07:15:34 +0000
commit130c5cdd7fcac385c4ea2e0377645aa40e9471e3 (patch)
treebafb834e1b2cd047b4548383d766fc465e4645e4 /lisp/ls-lisp.el
parentf17cf9869ef786bc29380004b2b4dfb5cc44376d (diff)
downloademacs-130c5cdd7fcac385c4ea2e0377645aa40e9471e3.tar.gz
(insert-directory): Gracefully handle the case
where a file disappears between when it is listed in the directory and when the attributes are requested.
Diffstat (limited to 'lisp/ls-lisp.el')
-rw-r--r--lisp/ls-lisp.el10
1 files 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")