Commit 3cfb886e authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(insert-directory): Gracefully handle the case

where a file disappears between when it is listed in the directory
and when the attributes are requested.
parent 5d3b0f18
......@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment