From 6e8e8e47a96ce8614f7c52fbba63687ad6e67390 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 14 Jan 2001 19:16:07 +0000 Subject: [PATCH] (dired-insert-directory): If file-system-info fails, remove the " free " part, but don't signal an error. --- lisp/dired.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 -- 2.39.5