changeset 8409:4a27ca4bcdf4

(insert-directory): Gracefully handle the case where a file disappears between when it is listed in the directory and when the attributes are requested.
author Richard M. Stallman <rms@gnu.org>
date Mon, 01 Aug 1994 07:15:34 +0000
parents 109166e311ce
children bbe98fdd1615
files lisp/ls-lisp.el
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ls-lisp.el	Mon Aug 01 07:11:43 1994 +0000
+++ b/lisp/ls-lisp.el	Mon Aug 01 07:15:34 1994 +0000
@@ -105,12 +105,12 @@
 		  (ls-lisp-handle-switches file-alist switches))
 	    (while file-alist
 	      (setq elt (car file-alist)
+		    file-alist (cdr 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)))
+		    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")