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
commit3cfb886e3dfd1b6c645420a7eb912c4fd8def9ef (patch)
tree9cdc66f3378774ec129286140f337af9776911ed /lisp/ls-lisp.el
parent5d3b0f182f500449cc404d56ec141d83eb35581c (diff)
downloademacs-3cfb886e3dfd1b6c645420a7eb912c4fd8def9ef.tar.gz
emacs-3cfb886e3dfd1b6c645420a7eb912c4fd8def9ef.tar.bz2
emacs-3cfb886e3dfd1b6c645420a7eb912c4fd8def9ef.zip
(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")