]> git.eshelyaron.com Git - emacs.git/commitdiff
(insert-directory): Gracefully handle the case
authorRichard M. Stallman <rms@gnu.org>
Mon, 1 Aug 1994 07:15:34 +0000 (07:15 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 1 Aug 1994 07:15:34 +0000 (07:15 +0000)
where a file disappears between when it is listed in the directory
and when the attributes are requested.

lisp/ls-lisp.el

index cd6c68b46b9ae2afe3677b985bf44852b07c406f..48a7616e44552d7b566e3f7ef4a78e69e6cb4a91 100644 (file)
@@ -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")