From: Eli Zaretskii Date: Sun, 14 Jan 2001 19:16:07 +0000 (+0000) Subject: (dired-insert-directory): If file-system-info fails, X-Git-Tag: emacs-pretest-21.0.96~299 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6e8e8e47a96ce8614f7c52fbba63687ad6e67390;p=emacs.git (dired-insert-directory): If file-system-info fails, remove the " free " part, but don't signal an error. --- diff --git a/lisp/dired.el b/lisp/dired.el index 4a9a637797c..7b77ee77239 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -689,9 +689,13 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh." ;; Non-Posix systems don't always have dired-free-space-program, ;; but might have an equivalent system call. (if (fboundp 'file-system-info) - (insert - (format "%.0f" - (/ (nth 2 (file-system-info dir-or-list)) 1024))) + (let ((beg (point)) + (fsinfo (file-system-info dir-or-list))) + (if fsinfo + (insert + (format "%.0f" (/ (nth 2 fsinfo) 1024))) + ;; file-system-info failed; delete " free ". + (delete-region (- beg 7) beg))) (let ((beg (point))) (condition-case nil (if (zerop (call-process dired-free-space-program nil t nil